/* ════════════════════════════════════════
   FANTABET — LIVE ODDS WIDGET
   ════════════════════════════════════════ */

.fantabet-odds-widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin: 28px 0;
    box-shadow: var(--shadow);
}

/* ─── HEADER ─── */
.odds-widget-header {
    background: var(--nav-bg);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.odds-widget-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red-accent), var(--gold-accent));
}

.odds-widget-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: #f5f2eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.odds-live-dot {
    width: 8px; height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
    animation: oddsPulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes oddsPulse {
    0%,100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.5); opacity: 0.5; }
}

.odds-widget-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.odds-status {
    font-size: 11px;
    color: rgba(245,242,235,0.4);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.odds-updated {
    font-size: 11px;
    color: rgba(245,242,235,0.35);
    font-family: var(--font-mono);
}

.odds-updated--cached::before { content: '📦 '; }

/* ─── SPORT TABS ─── */
.odds-sport-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 16px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}
.odds-sport-tabs::-webkit-scrollbar { display: none; }

.odds-sport-tab {
    padding: 5px 12px;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    font-family: var(--font-body);
}

.odds-sport-tab:hover  { background: var(--surface); color: var(--ink); }
.odds-sport-tab.active { background: var(--red-accent); border-color: var(--red-accent); color: white; }

/* ─── LISTA PARTITE ─── */
.odds-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ─── MATCH CARD ─── */
.odds-match-card {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.odds-match-card:last-child { border-bottom: none; }
.odds-match-card:hover { background: var(--bg2); }

.odds-match-meta {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.odds-match-time {
    font-size: 11px;
    color: var(--muted);
    font-family: var(--font-mono);
}

.odds-live-badge {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
    animation: oddsPulse 2s ease-in-out infinite;
}

.odds-match-teams {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.odds-team {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    flex: 1;
}

.odds-team--away { text-align: right; }

.odds-vs {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 1px;
    flex-shrink: 0;
}

/* ─── QUOTA BUTTONS ─── */
.odds-buttons-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.odds-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 6px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg2);
    transition: all 0.15s;
    cursor: pointer;
}

.odds-btn:hover {
    background: var(--surface);
    border-color: var(--red-accent);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(200,65,10,0.15);
}

.odds-btn-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.odds-btn-value {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--red-accent);
    line-height: 1;
}

/* Evidenzia quota alta */
.odds-btn--1:hover .odds-btn-value,
.odds-btn--2:hover .odds-btn-value { color: var(--red-accent); }
.odds-btn--x:hover .odds-btn-value { color: var(--gold-accent); }
.odds-btn--x .odds-btn-value { color: var(--ink2); }

.odds-source {
    font-size: 10px;
    color: var(--muted);
    text-align: right;
}

/* ─── SKELETON LOADER ─── */
@keyframes oddsShimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.odds-skeleton {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.odds-skeleton:last-child { border-bottom: none; }

.odds-sk-teams {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.odds-sk-bar {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--bg2) 25%, var(--border) 50%, var(--bg2) 75%);
    background-size: 800px 100%;
    animation: oddsShimmer 1.4s ease infinite;
    display: block;
}

.odds-sk-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.odds-sk-btn {
    height: 42px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--bg2) 25%, var(--border) 50%, var(--bg2) 75%);
    background-size: 800px 100%;
    animation: oddsShimmer 1.4s ease 0.1s infinite;
    display: block;
}

/* ─── STATI: errore e vuoto ─── */
.odds-error,
.odds-empty {
    padding: 32px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.odds-error span,
.odds-empty span { font-size: 28px; }

.odds-error { color: #e74c3c; }

/* ─── FOOTER ─── */
.odds-widget-footer {
    padding: 10px 20px;
    background: var(--bg2);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.odds-disclaimer {
    font-size: 10px;
    color: var(--muted);
}

.odds-cta-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--red-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}
.odds-cta-link:hover { opacity: 0.75; }

/* ─── DARK MODE ─── */
[data-theme="dark"] .odds-btn {
    background: var(--surface2);
    border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .odds-btn:hover {
    background: var(--surface);
}
[data-theme="dark"] .odds-sk-bar,
[data-theme="dark"] .odds-sk-btn {
    background: linear-gradient(90deg, var(--surface2) 25%, var(--surface) 50%, var(--surface2) 75%);
    background-size: 800px 100%;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
    .odds-widget-header { padding: 12px 14px; }
    .odds-match-card    { padding: 12px 14px; }
    .odds-match-teams   { flex-direction: column; align-items: flex-start; gap: 4px; }
    .odds-team--away    { text-align: left; }
    .odds-vs            { display: none; }
    .odds-btn-value     { font-size: 14px; }
}
