/* RLTV Popular Cases Widget — Styles */

/* ── Shared container ─────────────────────────────────────────── */
.rltv-cw-inner,
.widget .rltv-cw-inner {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #1e293b;
}

/* ── Period label (single-mode, no tabs) ──────────────────────── */
.rltv-cw-period-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
    margin: 0 0 10px;
    padding: 0;
}

/* ── Tab bar ──────────────────────────────────────────────────── */
.rltv-cw-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 12px;
}

.rltv-cw-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    text-align: center;
}

.rltv-cw-tab:hover {
    color: #1a2744;
}

.rltv-cw-tab--active {
    color: #1a2744;
    border-bottom-color: #c0392b;
}

/* ── Ordered list ─────────────────────────────────────────────── */
.rltv-cw-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── Case item ────────────────────────────────────────────────── */
.rltv-cw-item {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.rltv-cw-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ── Item header row ──────────────────────────────────────────── */
.rltv-cw-item-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* Rank number */
.rltv-cw-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    background: #1a2744;
    color: #c9a84c;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}

.rltv-cw-item-title-group {
    flex: 1;
    min-width: 0;
}

/* Case name link */
.rltv-cw-case-name {
    display: block;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a2744;
    text-decoration: none;
    line-height: 1.35;
    word-break: break-word;
}

.rltv-cw-case-name:hover { color: #c0392b; }

/* Citation */
.rltv-cw-citation {
    display: inline-block;
    font-size: 0.72rem;
    color: #94a3b8;
    font-style: italic;
    margin-top: 1px;
}

/* Article count bubble */
.rltv-cw-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: default;
}

/* ── Court line ───────────────────────────────────────────────── */
.rltv-cw-court {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    color: #64748b;
    margin: 3px 0 3px 30px;
}

.rltv-cw-court svg { flex-shrink: 0; }

/* ── Outcome badge ────────────────────────────────────────────── */
.rltv-cw-outcome {
    display: inline-block;
    margin: 3px 0 3px 30px;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Holding ──────────────────────────────────────────────────── */
.rltv-cw-holding {
    margin: 4px 0 4px 30px;
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.5;
    font-style: italic;
}

/* ── PDF badge ────────────────────────────────────────────────── */
.rltv-cw-pdf-badge {
    display: inline-block;
    margin: 3px 0 3px 30px;
    font-size: 0.68rem;
    color: #166534;
    background: #dcfce7;
    border-radius: 4px;
    padding: 1px 6px;
    font-weight: 600;
}

/* ── Top article ──────────────────────────────────────────────── */
.rltv-cw-top-article {
    margin: 4px 0 0 30px;
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    flex-wrap: wrap;
}

.rltv-cw-top-article svg { flex-shrink: 0; margin-top: 2px; }

.rltv-cw-top-article a {
    color: #1a2744;
    text-decoration: none;
    font-weight: 600;
}

.rltv-cw-top-article a:hover { color: #c0392b; }

.rltv-cw-top-rel {
    color: #c9a84c;
    font-weight: 700;
}

/* ── Footer / browse link ─────────────────────────────────────── */
.rltv-cw-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.rltv-cw-browse-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1a2744;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rltv-cw-browse-link:hover { color: #c0392b; }

/* ── Empty state ──────────────────────────────────────────────── */
.rltv-cw-empty {
    font-size: 0.82rem;
    color: #94a3b8;
    text-align: center;
    padding: 12px 0;
    margin: 0;
}

.rltv-cw-empty a {
    color: #1a2744;
    font-weight: 600;
}

/* ── Shortcode wrapper overrides ──────────────────────────────── */
.rltv-cw-shortcode {
    border: 1px solid #e2e8f0;
    border-top: 3px solid #1a2744;
    border-radius: 0 0 8px 8px;
    padding: 16px 18px;
    background: #fff;
}

/* ── Tab JS — injected inline ─────────────────────────────────── */
/* (no separate JS file needed — handled by inline <script> below) */
