/* GDT Scores Widget — Compact, scrollable sidebar widget */

.gdt-sw-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 16px;
}

/* ── Header ────────────────────────────────────────────────────────── */
.gdt-sw-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    color: #fff;
}
.gdt-sw-header-icon { font-size: 14px; flex-shrink: 0; }
.gdt-sw-header-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex: 1;
}
.gdt-sw-live-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.25);
    padding: 2px 7px;
    border-radius: 10px;
    animation: gdt-sw-pulse 2s ease-in-out infinite;
}
@keyframes gdt-sw-pulse { 0%,100%{opacity:1} 50%{opacity:0.6} }

/* ── Light theme ────────────────────────────────────────────────────── */
.gdt-sw-light .gdt-sw-body { background: #fff; border: 1px solid #e8ecf0; border-top: none; }
.gdt-sw-light .gdt-sw-game { border-bottom: 1px solid #f1f5f9; }
.gdt-sw-light .gdt-sw-team-name { color: #1a2332; }
.gdt-sw-light .gdt-sw-team-name.winner { color: #0D1B2A; font-weight: 800; }
.gdt-sw-light .gdt-sw-team-name.loser  { color: #8899AA; }
.gdt-sw-light .gdt-sw-score { color: #0D1B2A; }
.gdt-sw-light .gdt-sw-score.winner { color: #0D1B2A; font-weight: 800; }
.gdt-sw-light .gdt-sw-score.loser  { color: #8899AA; }
.gdt-sw-light .gdt-sw-meta { color: #8899AA; }
.gdt-sw-light .gdt-sw-time { color: #374151; }
.gdt-sw-light .gdt-sw-empty { color: #8899AA; background: #f7f8fa; }
.gdt-sw-light .gdt-sw-footer { background: #f7f8fa; border-top: 1px solid #e8ecf0; color: #8899AA; }

/* ── Dark theme ─────────────────────────────────────────────────────── */
.gdt-sw-dark .gdt-sw-body { background: #111827; border: 1px solid #1f2937; border-top: none; }
.gdt-sw-dark .gdt-sw-game { border-bottom: 1px solid #1f2937; }
.gdt-sw-dark .gdt-sw-team-name { color: #e5e7eb; }
.gdt-sw-dark .gdt-sw-team-name.winner { color: #fff; font-weight: 800; }
.gdt-sw-dark .gdt-sw-team-name.loser  { color: #6b7280; }
.gdt-sw-dark .gdt-sw-score { color: #f9fafb; }
.gdt-sw-dark .gdt-sw-score.winner { color: #fff; font-weight: 800; }
.gdt-sw-dark .gdt-sw-score.loser  { color: #6b7280; }
.gdt-sw-dark .gdt-sw-meta { color: #6b7280; }
.gdt-sw-dark .gdt-sw-time { color: #d1d5db; }
.gdt-sw-dark .gdt-sw-empty { color: #6b7280; background: #111827; }
.gdt-sw-dark .gdt-sw-footer { background: #0f172a; border-top: 1px solid #1f2937; color: #6b7280; }

/* ── Scrollable game list ────────────────────────────────────────────── */
.gdt-sw-body {
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
}
.gdt-sw-body::-webkit-scrollbar { width: 4px; }
.gdt-sw-body::-webkit-scrollbar-track { background: transparent; }
.gdt-sw-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }

/* ── Individual game row ─────────────────────────────────────────────── */
.gdt-sw-game {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 9px 14px;
    align-items: center;
    transition: background .1s;
}
.gdt-sw-game:hover { background: rgba(0,0,0,0.03); }
.gdt-sw-game:last-child { border-bottom: none; }

/* Teams column */
.gdt-sw-teams { display: flex; flex-direction: column; gap: 4px; }

.gdt-sw-team-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.gdt-sw-team-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.gdt-sw-team-name {
    font-size: 12px;
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.gdt-sw-record {
    font-size: 10px;
    color: #8899AA;
    margin-left: auto;
    white-space: nowrap;
}

/* Score/time column */
.gdt-sw-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    min-width: 54px;
}

.gdt-sw-score {
    font-size: 14px;
    font-weight: 700;
    text-align: right;
    line-height: 1;
    min-width: 24px;
}

/* Status badge */
.gdt-sw-status {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 2px 6px;
    border-radius: 10px;
    white-space: nowrap;
    text-align: center;
}
.gdt-sw-status.live     { background: #fee2e2; color: #D81E2C; }
.gdt-sw-status.final    { background: #f1f5f9; color: #64748b; }
.gdt-sw-status.upcoming { background: #e0f2fe; color: #0369a1; }

.gdt-sw-dark .gdt-sw-status.final { background: #1f2937; color: #9ca3af; }

/* Time display (ET/CT) */
.gdt-sw-time {
    font-size: 10px;
    font-weight: 600;
    text-align: right;
    line-height: 1.4;
}

/* TV broadcast */
.gdt-sw-tv {
    font-size: 9px;
    color: #8899AA;
    text-align: right;
}

/* ── Loading ─────────────────────────────────────────────────────────── */
.gdt-sw-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    font-size: 12px;
    color: #8899AA;
}
.gdt-sw-spinner {
    width: 14px; height: 14px;
    border: 2px solid #e8ecf0;
    border-top-color: #0052D9;
    border-radius: 50%;
    animation: gdt-sw-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes gdt-sw-spin { to { transform: rotate(360deg); } }

/* ── Empty state ─────────────────────────────────────────────────────── */
.gdt-sw-empty {
    padding: 20px 14px;
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
}
.gdt-sw-empty-icon { font-size: 24px; margin-bottom: 6px; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.gdt-sw-footer {
    padding: 7px 14px;
    font-size: 10px;
    text-align: center;
    letter-spacing: .3px;
}

/* ── Date divider (schedule view) ────────────────────────────────────── */
.gdt-sw-date-divider {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8899AA;
    padding: 6px 14px 4px;
    background: rgba(0,0,0,0.02);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.gdt-sw-dark .gdt-sw-date-divider { background: rgba(255,255,255,0.03); border-bottom-color: rgba(255,255,255,0.05); }
