/* ── Page shell ──────────────────────────────────────────── */
.allsvenskan-page {
    padding: 90px 0 3rem;
    color: #e2e8f0;
    min-height: 100vh;
}

.as-page-title {
    color: #93c5fd;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 1.75rem;
}

.as-empty {
    color: #64748b;
    font-style: italic;
}

/* ── Betting bar ─────────────────────────────────────────── */
.as-betting-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 4px 0 6px;
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.as-betting-balance strong {
    color: #93c5fd;
}

.as-signin-link {
    display: inline-block;
    color: #93c5fd;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 5px 14px;
    border: 1px solid rgba(147, 197, 253, 0.3);
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.as-signin-link:hover {
    background: rgba(147, 197, 253, 0.1);
    border-color: rgba(147, 197, 253, 0.5);
    color: #fff;
    text-decoration: none;
}

.as-signout-link {
    font-size: 0.82rem;
    color: #93c5fd;
    text-decoration: underline;
}

.as-signout-link:hover { color: #bfdbfe; }

.as-balance-toggle-btn {
    background: none;
    border: 1px solid rgba(147, 197, 253, 0.25);
    border-radius: 4px;
    color: #64748b;
    font-size: 0.75rem;
    padding: 2px 8px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.as-balance-toggle-btn:hover {
    color: #93c5fd;
    border-color: rgba(147, 197, 253, 0.5);
}

/* ── Bet placed state ────────────────────────────────────── */
.as-bet-placed {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}

.as-bet-placed--pending {
    color: #93c5fd;
    background: rgba(147, 197, 253, 0.1);
    border: 1px solid rgba(147, 197, 253, 0.3);
}

.as-bet-placed--won {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.as-bet-placed--lost {
    color: #64748b;
    background: rgba(100, 116, 139, 0.08);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* ── Bet modal ───────────────────────────────────────────── */
.as-bet-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.as-bet-modal {
    background: #0f2744;
    border: 1px solid rgba(147, 197, 253, 0.25);
    border-radius: 10px;
    padding: 1.5rem;
    width: min(380px, 92vw);
    color: #e2e8f0;
}

.as-bet-modal-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #93c5fd;
    margin-bottom: 1rem;
}

.as-bet-modal-matchup {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    color: #94a3b8;
}

.as-pick-highlight {
    color: #e2e8f0;
    font-weight: 600;
}

.as-pick-vs {
    color: #475569;
}

.as-bet-modal-meta {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.as-bet-modal-odds-label { color: #64748b; }
#asBetModalOdds { color: #93c5fd; font-weight: 600; }

.as-bet-modal-stake-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.as-bet-modal-slider-row {
    margin-bottom: 0.5rem;
}

.as-modal-stake-slider {
    width: 100%;
    accent-color: #93c5fd;
}

.as-modal-stake-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 5px;
    color: #e2e8f0;
    font-size: 0.9rem;
    padding: 0.35rem 0.6rem;
    box-sizing: border-box;
}

.as-modal-stake-input--error {
    border-color: rgba(248, 113, 113, 0.5);
}

.as-bet-modal-error {
    font-size: 0.75rem;
    color: #f87171;
    margin: 0.4rem 0 0;
}

.as-bet-modal-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

.as-btn-modal-confirm {
    flex: 1;
    background: #93c5fd;
    color: #0a1628;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: background 0.12s;
}

.as-btn-modal-confirm:hover:not(:disabled) { background: #bfdbfe; }
.as-btn-modal-confirm:disabled { opacity: 0.45; cursor: default; }

.as-btn-modal-cancel {
    flex: 1;
    background: transparent;
    color: #64748b;
    border: 1px solid rgba(100,116,139,0.3);
    border-radius: 6px;
    font-size: 0.85rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.12s;
}

.as-btn-modal-cancel:hover { color: #94a3b8; }

.as-coming-soon {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* ── Round sections ──────────────────────────────────────── */
.as-round-section {
    margin-bottom: 0.35rem;
}

.as-round-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    background: rgba(147, 197, 253, 0.07);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 7px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.as-round-header:hover {
    background: rgba(147, 197, 253, 0.12);
}

.as-round-header--current {
    background: rgba(147, 197, 253, 0.13);
    border-color: rgba(147, 197, 253, 0.4);
}

.as-round-header--current:hover {
    background: rgba(147, 197, 253, 0.18);
}

.as-round-current-badge {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #93c5fd;
    border: 1px solid rgba(147, 197, 253, 0.45);
    border-radius: 3px;
    padding: 1px 5px;
}

.as-round-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #93c5fd;
}

.as-round-count {
    font-size: 0.72rem;
    color: #64748b;
    margin-left: auto;
}

.as-round-toggle {
    font-size: 0.65rem;
    color: #64748b;
}

/* ── Round body ──────────────────────────────────────────── */
.as-round-body {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
    border-radius: 0 0 7px 7px;
    overflow: hidden;
}

/* ── Fixture row ─────────────────────────────────────────── */
.as-fixture {
    display: grid;
    grid-template-columns: 130px 1fr 180px 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.85rem;
    height: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.12s;
}

.as-fixture:last-child {
    border-bottom: none;
}

.as-fixture:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* ── Date ────────────────────────────────────────────────── */
.as-date {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
}

/* ── Teams ───────────────────────────────────────────────── */
.as-team {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #94a3b8;
    overflow: hidden;
}

.as-team--home {
    flex-direction: row-reverse;
    justify-content: flex-start;
    text-align: right;
}

.as-team--away {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
}

.as-team--winner {
    color: #e2e8f0;
    font-weight: 600;
}

.as-team-name {
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.as-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.35));
}

/* ── Center cell (score / odds / vs) ─────────────────────── */
.as-center {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0 8px;
}

/* ── Score ───────────────────────────────────────────────── */
.as-score {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
}

.as-score--winner {
    color: #e2e8f0;
}

.as-score-dash {
    color: #334155;
    font-weight: 400;
}

.as-score--live {
    color: #4ade80;
    animation: as-pulse 2s ease-in-out infinite;
}

@keyframes as-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.6; }
}

/* ── Status badges ───────────────────────────────────────── */
.as-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 1px 5px;
    border-radius: 3px;
}

.as-badge--ft {
    color: #475569;
    border: 1px solid #1e293b;
}

.as-badge--live {
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
    background: rgba(74, 222, 128, 0.07);
}

.as-badge--ns {
    color: #334155;
    font-size: 0.8rem;
    font-weight: 400;
}

/* ── Odds ────────────────────────────────────────────────── */
.as-odds {
    display: flex;
    gap: 0.3rem;
}

.as-odds-btn {
    padding: 0.2rem 0.45rem;
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    background: rgba(147, 197, 253, 0.04);
    color: #93c5fd;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s;
}

.as-odds-btn:hover {
    background: rgba(147, 197, 253, 0.14);
    border-color: rgba(147, 197, 253, 0.45);
    color: #fff;
}

/* ── Mobile (covers all phones and tablets) ──────────────── */
@media (max-width: 1000px) {
    .allsvenskan-page {
        padding-top: 80px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .as-round-header {
        padding: 0.45rem 0.65rem;
    }

    /* Fixed 24px columns for logos; center gets all remaining width */
    .as-fixture {
        grid-template-columns: 24px 1fr 24px;
        grid-template-rows: auto auto;
        height: auto;
        padding: 0.35rem 0.4rem;
        gap: 0.1rem;
    }

    .as-date {
        grid-column: 1 / -1;
        font-size: 0.7rem;
        padding-bottom: 0.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        margin-bottom: 0.1rem;
    }

    .as-team--home  { grid-column: 1; grid-row: 2; }
    .as-center      { grid-column: 2; grid-row: 2; padding: 0; }
    .as-team--away  { grid-column: 3; grid-row: 2; }

    /* Single logo centered in its fixed column; reset row-reverse from desktop */
    .as-team,
    .as-team--home,
    .as-team--away {
        flex-direction: row;
        justify-content: center;
        gap: 0;
        overflow: visible;
    }

    .as-team-name {
        display: none;
    }

    .as-logo {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        filter: none;
    }

    /* Odds buttons fill the full center width, laid out as 1 | X | 2 */
    .as-odds {
        flex-direction: row;
        flex: 1;
        gap: 0.2rem;
    }

    .as-odds-btn {
        flex: 1;
        min-width: 0;
        font-size: 0.68rem;
        padding: 0.18rem 0.1rem;
        text-align: center;
    }
}

/* ============================================================
   Standings table
   ============================================================ */

.as-standings-section {
    margin: 1.25rem 0 2rem;
}

.as-standings-title {
    margin: 0 0 0.6rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: #f5f5f5;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.standings-table.as-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: #e3e5ed;
    background: #14161f;
    border-radius: 6px;
    overflow: hidden;
}

.standings-table.as-standings-table thead th {
    background: #1c1f2b;
    color: #b8bccc;
    font-weight: 600;
    text-align: center;
    padding: 0.55rem 0.4rem;
    border-bottom: 1px solid #2a2e3d;
    white-space: nowrap;
}

.standings-table.as-standings-table thead th.standings-team {
    text-align: left;
}

.standings-table.as-standings-table tbody td {
    padding: 0.5rem 0.4rem;
    text-align: center;
    border-bottom: 1px solid #20232f;
    white-space: nowrap;
}

.standings-table.as-standings-table tbody tr:last-child td {
    border-bottom: 0;
}

.standings-table.as-standings-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.standings-table.as-standings-table .standings-rank {
    width: 56px;
    text-align: center;
    font-weight: 600;
}

.standings-rank-num {
    margin-left: 0.2rem;
}

.standings-movement {
    display: inline-block;
    width: 0.9rem;
    font-size: 0.75rem;
    line-height: 1;
}

.standings-movement--up   { color: #4ade80; }
.standings-movement--down { color: #ef4444; }
.standings-movement--same { color: #6b7280; }

.standings-table.as-standings-table .standings-team {
    text-align: left;
}

.standings-team-cell {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.standings-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.standings-team-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.standings-table.as-standings-table .standings-pts {
    font-weight: 700;
    color: #fff;
}

/* Zone color-bands (left border + faint tint) */
.standings-row--ucl         td:first-child { border-left: 3px solid #22c55e; }
.standings-row--ucl                        { background: rgba(34, 197, 94, 0.06); }
.standings-row--uecl        td:first-child { border-left: 3px solid #84cc16; }
.standings-row--uecl                       { background: rgba(132, 204, 22, 0.05); }
.standings-row--rel-playoff td:first-child { border-left: 3px solid #f59e0b; }
.standings-row--rel-playoff                { background: rgba(245, 158, 11, 0.06); }
.standings-row--rel         td:first-child { border-left: 3px solid #ef4444; }
.standings-row--rel                        { background: rgba(239, 68, 68, 0.06); }

/* Form pills */
.standings-table.as-standings-table .standings-form {
    white-space: nowrap;
    min-width: 110px;
}

.form-pill {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    color: #fff;
    margin-right: 2px;
}

.form-pill:last-child { margin-right: 0; }

.form-pill--w { background: #22c55e; }
.form-pill--d { background: #6b7280; }
.form-pill--l { background: #ef4444; }
.form-pill--n { background: #2a2e3d; color: #b8bccc; }

/* Legend */
.as-standings-legend {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    font-size: 0.75rem;
    color: #b8bccc;
}

.as-zone-key {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.as-zone-key::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.as-zone-key--ucl::before         { background: #22c55e; }
.as-zone-key--uecl::before        { background: #84cc16; }
.as-zone-key--rel-playoff::before { background: #f59e0b; }
.as-zone-key--rel::before         { background: #ef4444; }

/* Mobile: hide team name text, keep logo only */
@media (max-width: 600px) {
    .standings-table.as-standings-table {
        font-size: 0.78rem;
    }

    .standings-table.as-standings-table thead th,
    .standings-table.as-standings-table tbody td {
        padding: 0.4rem 0.25rem;
    }

    .standings-table.as-standings-table .standings-team-name {
        display: none;
    }

    .standings-logo {
        width: 20px;
        height: 20px;
    }

    .form-pill {
        width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 0.65rem;
    }

    .standings-table.as-standings-table .standings-form {
        min-width: 96px;
    }
}

