/*
 * Betside Odds Widget — betside-odds.css
 * Pasuje do motywu betside.pl (dark, #0D0D13 bg, #FBAF08 akcent, Outfit/Manrope)
 */

/* ── Import fontów (Outfit + Manrope) jeśli motyw ich nie ładuje ───────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800;900&family=Manrope:wght@400;600;700&display=swap');

/* ── Reset lokalny ──────────────────────────────────────────────────────────── */
.betside-odds-widget,
.betside-odds-widget * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   WRAPPER
   ═══════════════════════════════════════════════════════════════════════════════ */
.betside-odds-widget {
    position: relative;
    width: 100%;
    max-width: 620px;
    margin: 0 auto 28px auto;

    background: linear-gradient(145deg, #0d1117 0%, #1a1f2c 55%, #0d1b2a 100%);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    padding: 22px 24px 20px 24px;
    overflow: hidden;

    font-family: 'Manrope', 'Outfit', system-ui, sans-serif;
    color: #e8eaf0;

    /* Subtle top-left shimmer */
    box-shadow:
        0 0 0 1px rgba(251, 175, 8, .06),
        0 8px 32px rgba(0, 0, 0, .55),
        inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* Złota kreska akcentowa na górze */
.betside-odds-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 3px;
    background: #FBAF08;
    border-radius: 0 0 4px 4px;
    opacity: .85;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   NAGŁÓWEK
   ═══════════════════════════════════════════════════════════════════════════════ */
.bow-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.bow-header-label {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #FBAF08;
    opacity: .95;
}

.bow-header-round {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, .38);
    letter-spacing: .04em;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DATA MECZU
   ═══════════════════════════════════════════════════════════════════════════════ */
.bow-date {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, .42);
    letter-spacing: .05em;
    margin-bottom: 18px;
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MATCHUP — 3 kolumny: [gospodarz] [kursy] [gość]
   ═══════════════════════════════════════════════════════════════════════════════ */
.bow-matchup {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

/* ── DRUŻYNA ── */
.bow-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.bow-team--away {
    /* gość: ta sama kolejność (logo → nazwa) */
}

/* Logo-wrapper: koło 60×60 */
.bow-logo-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.bow-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    display: block;
}

/* Fallback — skrót 3 liter */
.bow-logo-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: rgba(255, 255, 255, .50);
    letter-spacing: .03em;
}

/* Nazwa drużyny */
.bow-team-name {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.25;
    color: #e8eaf0;
    max-width: 130px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ── KURSY ── */
.bow-odds-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.bow-odds-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Pojedyncza komórka kursu */
.bow-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 58px;
    padding: 10px 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .10);
    cursor: default;
    transition: background .15s, border-color .15s;
}

.bow-cell:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .18);
}

/* Środkowy X — złoty akcent */
.bow-cell--x {
    background: rgba(251, 175, 8, .10);
    border-color: rgba(251, 175, 8, .25);
}

.bow-cell--x:hover {
    background: rgba(251, 175, 8, .17);
    border-color: rgba(251, 175, 8, .40);
}

/* Pusta komórka (brak kurów) */
.bow-cell--empty {
    background: rgba(255, 255, 255, .03);
    border-color: rgba(255, 255, 255, .06);
    cursor: default;
}

.bow-cell--empty:hover {
    background: rgba(255, 255, 255, .03);
    border-color: rgba(255, 255, 255, .06);
}

/* Wartość kursu (duża liczba) */
.bow-cell-val {
    font-family: 'Outfit', sans-serif;
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
    letter-spacing: -.5px;
    white-space: nowrap;
}

.bow-cell--x .bow-cell-val {
    color: #FBAF08;
}

.bow-cell--empty .bow-cell-val {
    font-size: 15px;
    color: rgba(255, 255, 255, .28);
    font-weight: 600;
    letter-spacing: 0;
}

/* Etykieta 1/X/2 */
.bow-cell-lbl {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .38);
    line-height: 1;
}

.bow-cell--x .bow-cell-lbl {
    color: rgba(251, 175, 8, .65);
}

/* Komunikat gdy brak kurów */
.bow-no-odds-msg {
    font-size: 11px;
    color: rgba(255, 255, 255, .30);
    text-align: center;
    font-style: italic;
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   STOPKA
   ═══════════════════════════════════════════════════════════════════════════════ */
.bow-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    flex-wrap: wrap;
}

/* Badge bukmachera (kolor ustawiony inline przez PHP) */
.bow-book-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 13px;
    border-radius: 100px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

/* Disclaimer */
.bow-disclaimer {
    font-size: 11px;
    color: rgba(255, 255, 255, .30);
    line-height: 1.4;
    font-style: italic;
    flex: 1;
    min-width: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BŁĄD
   ═══════════════════════════════════════════════════════════════════════════════ */
.betside-odds-error {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    color: rgba(255, 120, 100, .85);
    background: rgba(120, 0, 0, .18);
    border: 1px solid rgba(255, 80, 60, .25);
    border-radius: 10px;
    padding: 12px 16px;
    max-width: 620px;
    margin: 0 auto 16px auto;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSYWNOŚĆ
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── ≤ 480px: loga mniejsze, kursy ciasniejsze ────────────────────────────── */
@media (max-width: 480px) {
    .betside-odds-widget {
        padding: 18px 16px 16px 16px;
        border-radius: 16px;
    }

    .bow-matchup {
        gap: 8px;
    }

    .bow-logo-wrap {
        width: 52px;
        height: 52px;
    }

    .bow-logo {
        width: 38px;
        height: 38px;
    }

    .bow-team-name {
        font-size: 12px;
        max-width: 100px;
    }

    .bow-cell {
        min-width: 50px;
        padding: 9px 6px;
        border-radius: 12px;
    }

    .bow-cell-val {
        font-size: 18px;
    }

    .bow-cell-lbl {
        font-size: 9px;
    }
}

/* ── ≤ 380px: układ pionowy (logo nad nazwą, kursy na pełną szerokość) ──────── */
@media (max-width: 380px) {
    .betside-odds-widget {
        padding: 16px 12px 14px 12px;
    }

    .bow-matchup {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 10px;
        text-align: center;
    }

    .bow-team {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }

    .bow-team-name {
        max-width: 160px;
        text-align: left;
        -webkit-line-clamp: 1;
    }

    /* Kursy — wyśrodkowane, komórki większe */
    .bow-odds-wrap {
        order: -1;  /* kursy na górze */
    }

    .bow-cell {
        min-width: 64px;
        padding: 10px 8px;
    }

    .bow-cell-val {
        font-size: 20px;
    }

    .bow-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   JASNE TŁO (fallback gdy motyw nie jest ciemny)
   ═══════════════════════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: light) {
    /* Jeśli strona betside.pl jest zawsze ciemna, ten blok jest ignorowany.
       Zostawiamy go jako zabezpieczenie przy ewentualnym embed w jasnym środowisku. */
    .betside-odds-widget {
        /* Zachowujemy ciemne tło niezależnie od prefers-color-scheme */
        background: linear-gradient(145deg, #0d1117 0%, #1a1f2c 55%, #0d1b2a 100%);
        color: #e8eaf0;
    }
}
