/* ============================================================
   Sports Events Widget
   ============================================================ */

.se-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #1a1a2e;
    background-color: #ffffff;
    padding: 16px;
    border-radius: 8px;
}

.se-widget__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1a1a2e;
}

/* ── Tabs ── */

.se-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid #e8eaed;
}

.se-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: color .15s, border-color .15s;
    border-radius: 4px 4px 0 0;
}

.se-tab:hover {
    color: #1a1a2e;
}

.se-tab--active {
    color: #1a1a2e;
    border-bottom-color: #2563eb;
}

/* ── Panels ── */

.se-panel {
    display: none;
}

.se-panel--active {
    display: block;
}

/* ── Sport sub-tabs (mode: Live / Upcoming / Past inside a sport) ── */

.se-subtabs {
    display: flex;
    gap: 2px;
    margin: 10px 0 12px;
    border-bottom: 1px solid #e8eaed;
}

.se-subtabs--single {
    pointer-events: none;
}

.se-subtab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: color .15s, border-color .15s;
    border-radius: 3px 3px 0 0;
}

.se-subtab:hover {
    color: #1a1a2e;
}

.se-subtab--active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.se-subtab--label {
    cursor: default;
    color: #ef4444;
    border-bottom-color: #ef4444;
}

/* ── Sub-panels ── */

.se-subpanel {
    display: none;
}

.se-subpanel--active {
    display: block;
}

/* ── Live dot ── */

.se-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: se-pulse 1.2s ease-in-out infinite;
}

@keyframes se-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(1.3); }
}

/* ── Event Card ── */

.se-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: box-shadow .15s;
}

.se-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.se-card--live {
    border-left: 3px solid #ef4444;
    background: #fff9f9;
}

.se-card--result {
    border-left: 3px solid #6b7280;
    background: #f9f9f9;
}

.se-result-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #6b7280;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: .5px;
    flex-shrink: 0;
}

.se-card__score--final {
    font-size: 18px;
    font-weight: 700;
    color: #374151;
    letter-spacing: 1px;
}

/* Meta row */

.se-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
}

.se-card__tournament {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.se-card__time {
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
}

.se-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: .5px;
    flex-shrink: 0;
}

.se-live-badge__period {
    font-weight: 400;
    opacity: .85;
    letter-spacing: 0;
}

/* Match row */

.se-card__match {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.se-card__team {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.se-card__team--away {
    flex-direction: row-reverse;
    text-align: right;
}

.se-card__logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 50%;
    background: #f3f4f6;
    padding: 2px;
}

.se-card__logo-placeholder {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    flex-shrink: 0;
}

.se-card__name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.se-card__vs {
    flex-shrink: 0;
    text-align: center;
    min-width: 48px;
}

.se-card__vs-text {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.se-card__score {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: 1px;
}

/* Odds row */

.se-card__odds {
    display: flex;
    gap: 6px;
}

.se-card__odd-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 6px 8px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background .15s, border-color .15s;
    cursor: pointer;
}

.se-card__odd-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.se-card__odd-label {
    font-size: 11px;
    color: inherit;
    opacity: .7;
    margin-bottom: 2px;
}

.se-card__odd-value {
    font-size: 15px;
    font-weight: 700;
}

/* Bet button (when odds hidden) */

.se-card__bet-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    transition: background .15s;
    align-self: flex-start;
}

.se-card__bet-btn:hover {
    background: #1d4ed8;
    color: #fff;
}

/* Empty state */

.se-empty {
    padding: 24px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* Loading skeleton */

.se-loading {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.se-skeleton {
    height: 100px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: se-shimmer 1.4s infinite;
    border-radius: 10px;
}

@keyframes se-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Responsive ── */

@media (max-width: 480px) {
    .se-card__name {
        font-size: 12px;
    }
    .se-card__logo {
        width: 26px;
        height: 26px;
    }
    .se-card__odd-value {
        font-size: 13px;
    }
    .se-tab {
        padding: 6px 14px;
        font-size: 13px;
    }
}
