/* =======================================================================
   CITAD Latest News Widget  —  citad-latest-news.css
   ======================================================================= */

/* ── Root tokens ────────────────────────────────────────────────────── */
.cln-widget {
    --cln-bg:           #ffffff;
    --cln-border:       #e8ecf4;
    --cln-radius:       16px;
    --cln-shadow:       0 4px 24px rgba(0,0,0,.07);

    --cln-primary:      #1a3a8f;   /* deep navy – category, links */
    --cln-accent:       #e02020;   /* red – divider, LIVE dot */
    --cln-text-dark:    #1a2340;
    --cln-text-muted:   #8a94a6;
    --cln-text-meta:    #aab0bc;

    --cln-day-size:     2.2rem;
    --cln-divider-w:    3px;

    font-family: -apple-system, "Inter", "Segoe UI", Arial, sans-serif;
    background: var(--cln-bg);
    border: 1px solid var(--cln-border);
    border-radius: var(--cln-radius);
    box-shadow: var(--cln-shadow);
    overflow: hidden;
    max-width: 420px;       /* adjust per theme column width */
    width: 100%;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.cln-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid var(--cln-border);
}

.cln-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fde8e8;
    border-radius: 9px;
    color: var(--cln-accent);
    flex-shrink: 0;
}

.cln-header__icon svg {
    width: 18px;
    height: 18px;
}

.cln-header__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cln-text-dark);
    flex: 1;
    line-height: 1.2;
}

.cln-header__live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cln-accent);
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.cln-header__live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cln-accent);
    animation: cln-pulse 1.6s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes cln-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .45; transform: scale(1.25); }
}

/* ── List & scrollable area ─────────────────────────────────────────── */
.cln-list {
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d0d5de transparent;
}

.cln-list::-webkit-scrollbar       { width: 6px; }
.cln-list::-webkit-scrollbar-track { background: transparent; }
.cln-list::-webkit-scrollbar-thumb { background: #d0d5de; border-radius: 10px; }

/* ── Single news item ───────────────────────────────────────────────── */
.cln-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px dashed var(--cln-border);
    transition: background .18s ease;
}

.cln-item:last-child { border-bottom: none; }

.cln-item:hover { background: #f7f9fc; }

/* Date column */
.cln-item__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 34px;
    flex-shrink: 0;
    padding-top: 2px;
}

.cln-item__day {
    font-size: var(--cln-day-size);
    font-weight: 800;
    color: var(--cln-text-dark);
    line-height: 1;
    letter-spacing: -0.04em;
}

.cln-item__weekday {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--cln-text-muted);
    text-transform: uppercase;
    margin-top: 3px;
    letter-spacing: 0.02em;
}

/* Red vertical divider */
.cln-item__divider {
    width: var(--cln-divider-w);
    min-height: 70px;
    background: var(--cln-accent);
    border-radius: 4px;
    flex-shrink: 0;
    align-self: stretch;
}

/* Body */
.cln-item__body {
    flex: 1;
    min-width: 0;
}

.cln-item__category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--cln-primary);
    letter-spacing: 0.06em;
    text-decoration: none;
    margin-bottom: 5px;
    text-transform: uppercase;
    transition: opacity .15s;
}

.cln-item__category:hover { opacity: .75; }

.cln-item__title {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--cln-text-dark);
}

.cln-item__title a {
    color: inherit;
    text-decoration: none;
    transition: color .18s;
}

.cln-item__title a:hover { color: var(--cln-primary); }

/* Meta (views · comments) */
.cln-item__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--cln-text-meta);
}

.cln-item__meta-views,
.cln-item__meta-comments {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cln-item__meta svg {
    width: 14px;
    height: 14px;
    opacity: .65;
    flex-shrink: 0;
}

.cln-item__meta-sep {
    font-size: 1rem;
    line-height: 1;
    opacity: .4;
}

/* Empty state */
.cln-empty {
    padding: 24px 20px;
    text-align: center;
    color: var(--cln-text-muted);
    font-size: 0.9rem;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.cln-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid var(--cln-border);
    background: #fafbfd;
}

.cln-footer__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--cln-primary);
    text-decoration: none;
    transition: gap .2s;
}

.cln-footer__link:hover { gap: 10px; }

.cln-footer__link svg {
    width: 15px;
    height: 15px;
}

.cln-footer__count {
    font-size: 0.85rem;
    color: var(--cln-text-muted);
    font-weight: 500;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .cln-widget { max-width: 100%; border-radius: 12px; }
    .cln-item    { padding: 14px 16px; gap: 10px; }
    .cln-header  { padding: 14px 16px; }
    .cln-footer  { padding: 12px 16px; }
    .cln-item__day { font-size: 1.9rem; }
    .cln-list { max-height: 380px; }
}
