/* =========================================================
   NobarTV LiveScore v8.2 — live-counter.css
   Redesign: horizontal compact row, no logos, scrollable,
   modern glassmorphism dark theme.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

/* ── Body lock saat modal terbuka ── */
body.nbtv-modal-lock { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════
   OVERLAY
═══════════════════════════════════════════════════════════ */
.nbtv-live-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    visibility: hidden;
}
@media (min-width: 600px) {
    .nbtv-live-modal { align-items: center; }
}
.nbtv-live-modal.nbtv-live-modal-open {
    pointer-events: auto;
    visibility: visible;
}

/* ── Backdrop ── */
.nbtv-live-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 20, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .25s ease;
}
.nbtv-live-modal-open .nbtv-live-modal-backdrop { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   MODAL BOX
═══════════════════════════════════════════════════════════ */
.nbtv-live-modal-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 540px;
    height: 88svh;
    max-height: 88vh;
    background: #0d1424;
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255,255,255,.07);
    border-bottom: none;
    box-shadow:
        0 -8px 60px rgba(0,0,0,.55),
        inset 0 1px 0 rgba(255,255,255,.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.34,1.05,.64,1);
    will-change: transform;
}
@media (min-width: 600px) {
    .nbtv-live-modal-box {
        height: auto;
        max-height: 80vh;
        border-radius: 18px;
        border: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 20px 70px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.05);
        transform: translateY(20px) scale(.96);
        opacity: 0;
        transition: transform .28s cubic-bezier(.34,1.05,.64,1), opacity .22s ease;
    }
}
.nbtv-live-modal-open .nbtv-live-modal-box {
    transform: translateY(0);
}
@media (min-width: 600px) {
    .nbtv-live-modal-open .nbtv-live-modal-box {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ── Drag handle (mobile only) ── */
.nbtv-live-modal-box::before {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    background: rgba(255,255,255,.18);
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
}
@media (min-width: 600px) {
    .nbtv-live-modal-box::before { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════ */
.nbtv-live-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 11px;
    background: linear-gradient(135deg, #111827 0%, #0d1424 100%);
    border-bottom: 1px solid rgba(239,68,68,.3);
    flex-shrink: 0;
    position: relative;
}
.nbtv-live-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239,68,68,.6), transparent);
}

.nbtv-live-modal-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.nbtv-live-modal-title .nbtv-pulse {
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(239,68,68,.7);
    animation: nbtv-pulse-ring 1.8s ease-in-out infinite;
}
@keyframes nbtv-pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.7); }
    70%  { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

.nbtv-live-modal-count {
    background: #ef4444;
    color: #fff;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: .5px;
    line-height: 1.5;
}
.nbtv-live-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.65);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s, color .15s, transform .15s;
}
.nbtv-live-modal-close:hover {
    background: rgba(239,68,68,.2);
    border-color: rgba(239,68,68,.4);
    color: #ef4444;
    transform: rotate(90deg);
}

/* ═══════════════════════════════════════════════════════════
   SEARCH BAR
═══════════════════════════════════════════════════════════ */
.nbtv-lm-search-wrap {
    padding: 9px 12px;
    background: #0d1424;
    border-bottom: 1px solid rgba(255,255,255,.05);
    flex-shrink: 0;
}
.nbtv-lm-search-wrap.nbtv-lm-search-hidden { display: none; }

.nbtv-lm-search-inner {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    padding: 0 12px;
    gap: 8px;
    transition: border-color .15s;
}
.nbtv-lm-search-inner:focus-within {
    border-color: rgba(239,68,68,.5);
    background: rgba(255,255,255,.07);
}
.nbtv-lm-search-inner svg { opacity: .4; flex-shrink: 0; color: #fff; }
.nbtv-lm-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    padding: 8px 0;
    min-width: 0;
}
.nbtv-lm-search-input::placeholder { color: rgba(255,255,255,.28); }

/* ═══════════════════════════════════════════════════════════
   BODY — scrollable
═══════════════════════════════════════════════════════════ */
.nbtv-live-modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding: 10px 10px 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
    /* Scroll snap hint */
    scroll-padding-top: 8px;
}
.nbtv-live-modal-body::-webkit-scrollbar { width: 3px; }
.nbtv-live-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.12);
    border-radius: 2px;
}

/* ── League group ── */
.nbtv-lm-league {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    overflow: visible; /* allow sticky header to work */
    position: relative;
}

.nbtv-lm-league-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.06);
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
/* League accent dot */
.nbtv-lm-league-header::before {
    content: '';
    width: 3px;
    height: 14px;
    background: #ef4444;
    border-radius: 2px;
    flex-shrink: 0;
}
.nbtv-lm-league-header img { display: none; } /* logo liga tetap tersembunyi */
.nbtv-lm-league-header > span:not(.nbtv-lm-league-count) {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,.65);
    letter-spacing: .8px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.nbtv-lm-league-count {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: rgba(239,68,68,.8);
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.2);
    padding: 1px 7px;
    border-radius: 999px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   MATCH ROW — horizontal compact: Home [X:X] Away · min
═══════════════════════════════════════════════════════════ */
.nbtv-lm-match {
    display: flex;
    align-items: center;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    gap: 0;
    transition: background .12s;
    cursor: default;
    min-height: 40px;
}
.nbtv-lm-match:last-child { border-bottom: none; }
.nbtv-lm-match:hover { background: rgba(239,68,68,.04); }

/* Baris match yang bisa diklik (ada artikel atau bisa buat artikel) */
.nbtv-lm-match-clickable {
    cursor: pointer;
}
.nbtv-lm-match-clickable:hover {
    background: rgba(249,115,22,.08) !important;
}
.nbtv-lm-match-clickable:active {
    background: rgba(249,115,22,.15) !important;
}
/* Sudah ada artikel */
.nbtv-lm-match-linked:hover {
    background: rgba(74,222,128,.07) !important;
}
/* Loading state */
.nbtv-lm-match-loading {
    opacity: .65;
    cursor: wait !important;
}
/* Label artikel (pojok kanan baris match) — hanya icon panah ↗ */
.nbtv-lm-match-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding-left: 8px;
    flex-shrink: 0;
    color: rgba(255,255,255,.28);
    transition: color .15s, transform .15s;
}
.nbtv-lm-match-clickable:hover .nbtv-lm-match-label {
    color: var(--nbtv-orange, #f97316);
    transform: translate(1px,-1px);
}
.nbtv-lm-match-linked .nbtv-lm-match-label {
    color: rgba(74,222,128,.55);
}
.nbtv-lm-match-linked:hover .nbtv-lm-match-label {
    color: #4ade80;
    transform: translate(1px,-1px);
}
.nbtv-lm-art-icon {
    flex-shrink: 0;
}
.nbtv-lm-art-pending {
    color: rgba(249,115,22,.6);
}

/* Team names */
.nbtv-lm-team-home,
.nbtv-lm-team-away {
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255,255,255,.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    line-height: 1;
}
.nbtv-lm-team-home { text-align: right; padding-right: 8px; }
.nbtv-lm-team-away { text-align: left; padding-left: 8px; }
.nbtv-lm-team-home.nbtv-lm-winner,
.nbtv-lm-team-away.nbtv-lm-winner {
    color: #f59e0b;
    font-weight: 700;
}

/* Score block */
.nbtv-lm-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 3px;
    min-width: 72px;
}
.nbtv-lm-score {
    display: flex;
    align-items: center;
    gap: 1px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.5px;
    line-height: 1;
}
.nbtv-lm-score-win { color: #f59e0b; }
.nbtv-lm-sep {
    font-size: 14px;
    color: rgba(255,255,255,.3);
    margin: 0 3px;
    font-weight: 400;
}
.nbtv-lm-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(239,68,68,.15);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,.25);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .6px;
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
}
.nbtv-lm-badge .nbtv-pulse {
    width: 4px; height: 4px;
    background: #ef4444;
    border-radius: 50%;
    animation: nbtv-pulse-ring 1.8s ease-in-out infinite;
    flex-shrink: 0;
}

/* ── Empty & no-results ── */
.nbtv-live-modal-empty {
    text-align: center;
    padding: 50px 16px;
    color: rgba(255,255,255,.35);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
}
.nbtv-live-modal-empty-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
    opacity: .4;
}
.nbtv-lm-no-results {
    text-align: center;
    padding: 28px 16px;
    color: rgba(255,255,255,.3);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
}

/* ── Scroll hint ── */
.nbtv-lm-scroll-hint {
    text-align: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    color: rgba(255,255,255,.25);
    padding: 5px 0 2px;
    flex-shrink: 0;
    display: none;
    letter-spacing: .3px;
}
.nbtv-lm-scroll-hint.visible { display: block; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
.nbtv-lm-footer {
    padding: 8px 14px;
    background: rgba(255,255,255,.025);
    border-top: 1px solid rgba(255,255,255,.05);
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,.3);
    text-align: center;
    letter-spacing: .3px;
    flex-shrink: 0;
}
.nbtv-lm-footer strong {
    color: rgba(255,255,255,.75);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
    .nbtv-lm-team-home,
    .nbtv-lm-team-away { font-size: 11.5px; }
    .nbtv-lm-score      { font-size: 17px; }
    .nbtv-lm-center     { min-width: 64px; }
}
