/* GDT World Cup Widget v2 — Self-hosted, on-site styling */

.gdt-wc-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 720px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Light theme (default) */
.gdt-wc-light { background: #ffffff; border: 1px solid #e5e7eb; color: #1f2937; }
.gdt-wc-light .gdt-wc-header { background: linear-gradient(135deg, #0b3d91 0%, #1e5fc4 100%); color: #fff; }
.gdt-wc-light .gdt-wc-match { border-bottom: 1px solid #f1f5f9; }
.gdt-wc-light .gdt-wc-match:hover { background: #f8fafc; }
.gdt-wc-light .gdt-wc-team-name { color: #1f2937; }
.gdt-wc-light .gdt-wc-meta { color: #6b7280; }
.gdt-wc-light .gdt-wc-date-divider { color: #9ca3af; background: #f8fafc; }
.gdt-wc-light .gdt-wc-winner { color: #0b3d91; }
.gdt-wc-light .gdt-wc-loser { color: #9ca3af; }

/* Dark theme */
.gdt-wc-dark { background: #111827; border: 1px solid #1f2937; color: #f3f4f6; }
.gdt-wc-dark .gdt-wc-header { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); color: #fff; }
.gdt-wc-dark .gdt-wc-match { border-bottom: 1px solid #1f2937; }
.gdt-wc-dark .gdt-wc-match:hover { background: #1f2937; }
.gdt-wc-dark .gdt-wc-team-name { color: #f3f4f6; }
.gdt-wc-dark .gdt-wc-meta { color: #9ca3af; }
.gdt-wc-dark .gdt-wc-date-divider { color: #9ca3af; background: #1f2937; }
.gdt-wc-dark .gdt-wc-winner { color: #60a5fa; }
.gdt-wc-dark .gdt-wc-loser { color: #6b7280; }

/* Header */
.gdt-wc-header {
    padding: 14px 18px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gdt-wc-header-title { display: flex; align-items: center; gap: 8px; }
.gdt-wc-header-badge {
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    padding: 3px 8px;
    border-radius: 20px;
}

/* Loading state */
.gdt-wc-loading {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 50px 20px; color: #6b7280; font-size: 14px; gap: 12px;
}
.gdt-wc-spinner {
    width: 32px; height: 32px;
    border: 3px solid #e5e7eb; border-top-color: #2563eb; border-radius: 50%;
    animation: gdt-wc-spin .8s linear infinite;
}
@keyframes gdt-wc-spin { to { transform: rotate(360deg); } }

/* Match list */
.gdt-wc-match-list { max-height: 600px; overflow-y: auto; }

.gdt-wc-date-divider {
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.gdt-wc-match {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    gap: 12px;
    transition: background .15s;
}

.gdt-wc-match-group {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: #6b7280;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
}

.gdt-wc-teams { flex: 1; min-width: 0; }
.gdt-wc-team-row { display: flex; align-items: center; justify-content: space-between; padding: 3px 0; gap: 8px; }
.gdt-wc-team-name { font-weight: 600; font-size: 14px; }
.gdt-wc-team-name.gdt-wc-winner { font-weight: 800; }
.gdt-wc-team-score {
    font-weight: 800;
    font-size: 15px;
    min-width: 22px;
    text-align: center;
    background: #f1f5f9;
    border-radius: 5px;
    padding: 1px 7px;
}
.gdt-wc-dark .gdt-wc-team-score { background: #1f2937; }

.gdt-wc-match-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; min-width: 110px; }
.gdt-wc-match-time { font-size: 11px; font-weight: 600; color: #6b7280; text-align: right; line-height: 1.5; }
.gdt-wc-match-status {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    padding: 2px 8px; border-radius: 20px; letter-spacing: .5px;
}
.gdt-wc-status-live { background: #fee2e2; color: #dc2626; animation: gdt-wc-pulse 2s infinite; }
.gdt-wc-status-upcoming { background: #e0f2fe; color: #0369a1; }
.gdt-wc-status-finished { background: #f1f5f9; color: #64748b; }
.gdt-wc-dark .gdt-wc-status-finished { background: #1f2937; color: #9ca3af; }
@keyframes gdt-wc-pulse { 0%,100% { opacity:1; } 50% { opacity:0.5; } }

.gdt-wc-meta { font-size: 11px; margin-top: 3px; }
.gdt-wc-penalty-note { font-size: 10px; color: #d97706; font-weight: 600; margin-top: 2px; }

/* Empty / error state */
.gdt-wc-empty { text-align: center; padding: 40px 20px; color: #9ca3af; font-size: 14px; }

/* Footer */
.gdt-wc-footer { padding: 10px 18px; font-size: 11px; text-align: center; color: #9ca3af; border-top: 1px solid #f1f5f9; }
.gdt-wc-dark .gdt-wc-footer { border-top: 1px solid #1f2937; }

/* Responsive */
@media (max-width: 480px) {
    .gdt-wc-match { padding: 12px 14px; gap: 8px; }
    .gdt-wc-team-name { font-size: 13px; }
    .gdt-wc-match-side { min-width: 88px; }
    .gdt-wc-match-time { font-size: 10px; }
}
