/* =========================================================
   BTB Tips — AUTHORITATIVE Premium List (v7)
   Layout contract: [#] [META] [TEAMS] [STATS] everywhere.
   Mobile does NOT reorder columns. Only wraps internally.
   ========================================================= */

.btb-tips-shell {
    --bg: #020617;
    --border: rgba(148, 163, 184, 0.16);

    --text: #f8fafc;
    --muted: rgba(248, 250, 252, 0.62);

    --cyan: #0ea5e9;
    --cyanA: rgba(14, 165, 233, 0.16);

    --mint: #22c55e;
    --mintA: rgba(34, 197, 94, 0.14);

    --gold: #f59e0b;
    --goldA: rgba(245, 158, 11, 0.16);

    color: var(--text);
    font-family: inherit;

    max-width: 760px;
    margin: 0 auto;
    padding: 14px 12px 18px;

    border-radius: 18px;
    background:
        radial-gradient(900px 380px at 18% -10%, rgba(14, 165, 233, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.50), rgba(2, 6, 23, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.10);
}

/* ---------------------------------------------------------
   Top controls (pills + tabs) – keep existing markup
   --------------------------------------------------------- */
.btb-tips-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btb-pill {
    appearance: none;
    cursor: pointer;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 950;
    font-size: 12px;
    letter-spacing: .35px;
    transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.btb-pill:hover {
    border-color: rgba(245, 158, 11, .55);
    /* gold */
    background: rgba(245, 158, 11, .10);
    color: rgba(255, 237, 213, .95);
    /* gold text (no black) */
    box-shadow: 0 0 0 2px rgba(245, 158, 11, .10) inset;
}

.btb-pill.is-active {
    border-color: rgba(14, 165, 233, .60);
    background: rgba(14, 165, 233, .16);
    color: rgba(248, 250, 252, .96);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, .12) inset, 0 0 18px rgba(14, 165, 233, .14);
}

.btb-tips-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 12px;
}

.btb-tab {
    appearance: none;
    cursor: pointer;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 950;
    font-size: 12px;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.btb-tab.is-active {
    color: var(--text);
    border-color: rgba(14, 165, 233, .60);
    background: rgba(14, 165, 233, .14);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, .10) inset;
}

/* Banner / Empty */
.btb-tips-banner {
    border: 1px solid rgba(245, 158, 11, .35);
    background: rgba(245, 158, 11, .08);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.btb-tips-banner__title {
    font-weight: 950;
    letter-spacing: .25px;
    margin-bottom: 2px;
}

.btb-tips-banner__sub {
    color: rgba(255, 237, 213, .75);
    font-size: 13px;
}

.btb-tips-empty,
.btb-pane__error {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    padding: 12px;
    color: var(--muted);
}

/* =========================================================
   LIST + ROW
   ========================================================= */
.btb-tips-list {
    display: grid;
    gap: 10px;
}

/* Invariant grid: # / meta / teams / stats */
.btb-tipRow {
    border: 1px solid rgba(148, 163, 184, .14);
    background:
        radial-gradient(900px 320px at 12% 0%, rgba(14, 165, 233, .12), transparent 60%),
        rgba(255, 255, 255, .022);
    border-radius: 18px;
    padding: 10px 12px;

    box-shadow: 0 12px 26px rgba(0, 0, 0, .28);
    overflow: hidden;

    display: grid;
    grid-template-columns: 52px minmax(160px, 1.20fr) minmax(220px, 1.80fr) minmax(140px, 1fr);
    gap: 10px;
    align-items: center;

    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.btb-tipRow:hover {
    border-color: rgba(14, 165, 233, .30);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .34), 0 0 0 2px rgba(14, 165, 233, .10) inset;
    transform: translateY(-1px);
}

.btb-tipRow.is-locked {
    border-color: rgba(14, 165, 233, .14);
    background:
        radial-gradient(900px 320px at 12% 0%, rgba(14, 165, 233, .10), transparent 62%),
        radial-gradient(800px 280px at 92% 10%, rgba(245, 158, 11, .12), transparent 60%),
        rgba(255, 255, 255, .018);
}

/* # side */
.btb-tipRow__side {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btb-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(14, 165, 233, .26);
    background: rgba(14, 165, 233, .10);
    color: rgba(248, 250, 252, .92);
    font-weight: 950;
    font-size: 12px;
    letter-spacing: .2px;
    box-shadow: 0 0 16px rgba(14, 165, 233, .12);
}

/* =========================================================
   META (flag + comp/country + dt)
   ========================================================= */
.btb-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btb-meta__league {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.btb-meta__text {
    min-width: 0;
}

.btb-meta__comp {
    font-weight: 950;
    font-size: 13px;
    line-height: 1.15;

    /* 2-line clamp: stops "chopped" feeling */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btb-meta__country {
    margin-top: 2px;
    font-weight: 850;
    font-size: 12px;
    color: rgba(248, 250, 252, .52);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btb-meta__dt {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Date/KO pills */
.btb-dtPill {
    border: 1px solid rgba(148, 163, 184, .16);
    background: rgba(255, 255, 255, .02);
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 950;
    font-size: 11px;
    color: rgba(248, 250, 252, .72);
    white-space: nowrap;
}

.btb-dtPill--cyan {
    border-color: rgba(14, 165, 233, .40);
    background: rgba(14, 165, 233, .10);
    color: rgba(248, 250, 252, .92);
    box-shadow: 0 0 14px rgba(14, 165, 233, .12);
}

/* Flag + fallback */
.btb-flag {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(255, 255, 255, .02);
    flex: 0 0 auto;
}

.btb-flag--glow {
    box-shadow: 0 0 14px rgba(14, 165, 233, .26);
    border-color: rgba(14, 165, 233, .30);
}

.btb-flagDot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(14, 165, 233, .75);
    box-shadow: 0 0 14px rgba(14, 165, 233, .40);
    display: inline-block;
    flex: 0 0 auto;
}

/* =========================================================
   TEAMS (always stacked)
   ========================================================= */
.btb-teams {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btb-team {
    border: 1px solid rgba(148, 163, 184, .12);
    background: rgba(255, 255, 255, .02);
    border-radius: 14px;
    padding: 8px 10px;

    display: flex;
    align-items: center;
    gap: 10px;

    min-height: 38px;
    min-width: 0;
}

.btb-team--away {
    justify-content: flex-end;
}

.btb-teamName {
    font-weight: 950;
    font-size: 13px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.btb-logo {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    object-fit: contain;
    background: rgba(255, 255, 255, .02);
    border: 1px solid rgba(148, 163, 184, .14);
    flex: 0 0 auto;
}

/* =========================================================
   STATS (right side, wraps internally; never moves)
   ========================================================= */
.btb-stats {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

/* Chips */
.btb-chip {
    border: 1px solid rgba(148, 163, 184, .16);
    background: rgba(255, 255, 255, .02);
    border-radius: 999px;
    padding: 7px 10px;
    font-weight: 950;
    font-size: 12px;
    white-space: nowrap;
}

.btb-chip--avg {
    border-color: rgba(245, 158, 11, .70);
    background: linear-gradient(180deg, rgba(245, 158, 11, .22), rgba(245, 158, 11, .10));
    color: rgba(255, 237, 213, .98);
    box-shadow: 0 0 18px rgba(245, 158, 11, .18), inset 0 0 0 1px rgba(255, 237, 213, .10);

    padding: 8px 12px;
    /* slightly bigger */
    font-size: 12.5px;
    letter-spacing: .25px;
}


.btb-chip--ghost {
    color: rgba(248, 250, 252, .62);
    border-color: rgba(148, 163, 184, .14);
    background: rgba(255, 255, 255, .015);
}

.btb-chip--value {
    border-color: rgba(34, 197, 94, .46);
    background: rgba(34, 197, 94, .12);
    box-shadow: 0 0 14px rgba(34, 197, 94, .14);
}

/* =========================================================
   LOCK MASK (same grid, teams area replaced)
   ========================================================= */
.btb-mask {
    position: relative;
    border-radius: 14px;
    padding: 10px 12px;

    border: 1px solid rgba(148, 163, 184, .14);
    background:
        radial-gradient(1000px 320px at 12% 0%, rgba(14, 165, 233, .16), transparent 58%),
        radial-gradient(850px 280px at 90% 10%, rgba(245, 158, 11, .14), transparent 60%),
        rgba(255, 255, 255, .02);

    box-shadow: 0 8px 18px rgba(0, 0, 0, .22), 0 0 0 2px rgba(14, 165, 233, .08) inset;
    overflow: hidden;
    min-height: 84px;
}

.btb-mask::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, .10) 45%, transparent 55%);
    transform: rotate(10deg);
    animation: btbShimmer 2.8s linear infinite;
    pointer-events: none;
    opacity: .85;
}

@keyframes btbShimmer {
    0% {
        transform: translateX(-35%) rotate(10deg);
    }

    100% {
        transform: translateX(35%) rotate(10deg);
    }
}

.btb-mask__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.btb-mask__vip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-weight: 950;
    font-size: 11px;
    letter-spacing: .5px;
    border: 1px solid rgba(245, 158, 11, .62);
    background: linear-gradient(180deg, rgba(245, 158, 11, .22), rgba(245, 158, 11, .12));
    color: #ffedd5;
    box-shadow: 0 0 18px rgba(245, 158, 11, .22), inset 0 0 0 1px rgba(255, 237, 213, .12);
}

.btb-mask__lock {
    font-size: 18px;
    opacity: .95;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, .20));
}

.btb-mask__title {
    font-weight: 950;
    letter-spacing: .2px;
    font-size: 14px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btb-mask__sub {
    margin-top: 3px;
    color: rgba(248, 250, 252, .68);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btb-mask__bars {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 8px;
}

.btb-mask__bars span {
    height: 10px;
    border-radius: 999px;
    background: rgba(248, 250, 252, .10);
    border: 1px solid rgba(148, 163, 184, .12);
    box-shadow: 0 0 14px rgba(14, 165, 233, .08);
}

/* =========================================================
   RESPONSIVE: no reordering, just tightening
   ========================================================= */
@media (max-width: 720px) {
    .btb-tipRow {
        grid-template-columns: 52px minmax(140px, 1.25fr) minmax(180px, 1.75fr) minmax(120px, 1fr);
    }
}

@media (max-width: 520px) {
    .btb-tips-pills {
        justify-content: flex-start;
    }

    .btb-tipRow {
        /* KEEP THE SAME 4 columns – do not reorder */
        grid-template-columns: 52px 1.1fr 1.6fr 1fr;
        gap: 8px;
        padding: 10px;
    }

    .btb-meta {
        gap: 5px;
    }

    .btb-meta__dt {
        gap: 6px;
    }

    .btb-team {
        padding: 8px 9px;
        border-radius: 13px;
        min-height: 36px;
    }

    .btb-teamName {
        font-size: 13px;
    }

    .btb-stats {
        justify-content: flex-end;
        gap: 6px;
    }

    .btb-chip {
        padding: 7px 9px;
        font-size: 12px;
    }

    .btb-mask {
        min-height: 78px;
    }

    .btb-mask__bars {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* ===== Mobile hard fix: collapse grid instead of squeezing ===== */
@media (max-width: 420px) {
    .btb-tipRow {
        grid-template-columns: 52px 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "side meta"
            "side teams"
            "side stats";
        align-items: start;
    }

    .btb-tipRow__side {
        grid-area: side;
    }

    .btb-meta {
        grid-area: meta;
    }

    .btb-teams {
        grid-area: teams;
    }

    .btb-stats {
        grid-area: stats;
        justify-content: flex-start;
    }

    .btb-meta__dt {
        justify-content: flex-start;
    }

    .btb-stats {
        gap: 6px;
    }

    .btb-chip {
        font-size: 11px;
        padding: 6px 9px;
    }
}

/* ===== Locked row content (covers non-# area) ===== */
.btb-lockedRow {
    border: 1px solid rgba(148, 163, 184, .12);
    background: rgba(255, 255, 255, .02);
    border-radius: 16px;
    padding: 12px;
    min-height: 98px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.btb-lockedRow__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, .45);
    background: rgba(245, 158, 11, .10);
    box-shadow: 0 0 18px rgba(245, 158, 11, .14);
}

.btb-lockedRow__vip {
    font-weight: 950;
    font-size: 12px;
    letter-spacing: .35px;
    color: #ffedd5;
}

.btb-lockedRow__txt {
    font-weight: 900;
    font-size: 12px;
    color: rgba(248, 250, 252, .86);
}

.btb-lockedRow__lock {
    font-size: 16px;
    opacity: .95;
}

/* ===== Desktop: center VIP Locked pill ===== */
.btb-tipRow.is-locked .btb-lockedRow {
    display: flex;
    align-items: center;
    justify-content: center;
    /* <— key */
}

.btb-tipRow.is-locked .btb-lockedRow__inner {
    margin-inline: auto;
    /* <— belt + braces */
    justify-content: center;
    text-align: center;
}

/* ===== Mobile: horizontal scroll rail for filter pills ===== */
@media (max-width: 520px) {

    .btb-filterRow,
    .btb-toolbar,
    .btb-pills,
    .btb-chipRow {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 6px;
        /* breathing room so it doesn't feel cramped */
    }

    .btb-filterRow::-webkit-scrollbar,
    .btb-toolbar::-webkit-scrollbar,
    .btb-pills::-webkit-scrollbar,
    .btb-chipRow::-webkit-scrollbar {
        display: none;
    }

    /* Make the buttons behave like pills in a rail */
    .btb-filterRow>*,
    .btb-toolbar>*,
    .btb-pills>*,
    .btb-chipRow>* {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

/* ===== Premium structure: subtle bevel + divider ===== */
.btb-tipRow {
    position: relative;
}

.btb-tipRow::before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent);
    pointer-events: none;
}

.btb-tipRow::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 1px;
    background: rgba(0, 0, 0, .35);
    pointer-events: none;
    opacity: .6;
}

/* ===== VIP banner polish ===== */
.btb-vipNotice {
    border: 1px solid rgba(245, 158, 11, .22);
    background:
        radial-gradient(800px 160px at 20% 0%, rgba(245, 158, 11, .10), transparent 60%),
        linear-gradient(180deg, rgba(10, 10, 15, .55), rgba(2, 6, 23, .55));
    border-radius: 16px;
    padding: 14px 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

.btb-vipNotice h3 {
    margin: 0 0 6px;
    font-weight: 900;
    letter-spacing: .2px;
}

.btb-vipNotice p {
    margin: 0;
    color: rgba(226, 232, 240, .72);
    font-size: 13px;
}

.btb-tipRow.is-locked {
    filter: saturate(.95);
}

.btb-tipRow.is-locked .btb-lockedRow {
    backdrop-filter: blur(8px);
}

/* ===== Pane visibility safety (pairs with JS) ===== */
.btb-pane[hidden] {
    display: none !important;
}

/* ===== Mobile: make line tabs scroll horizontally instead of wrapping ===== */
.btb-tips-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
}

.btb-tips-tabs::-webkit-scrollbar {
    display: none;
}

.btb-tips-tabs .btb-tab {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* ===== Mobile: make the top pill groups scroll too ===== */
.btb-tips-shell__controls {
    gap: 10px;
}

.btb-tips-pills {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.btb-tips-pills::-webkit-scrollbar {
    display: none;
}

.btb-tips-pills .btb-pill {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* ===== Desktop: centre the VIP Locked “chip” within the locked row ===== */
.btb-tipRow.is-locked {
    position: relative;
}

.btb-tipRow.is-locked .btb-lockedRow {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* centres on desktop */
    min-width: 0;
}

/* Optional: improve premium feel (subtle) */
.btb-tipRow {
    backdrop-filter: blur(10px);
}

.btb-tips-shell {
    contain: content;
}

.btb-tipRow.is-locked> :not(.btb-tipRow__side):not(.btb-lockedRow) {
    display: none !important;
}

@media (min-width: 900px) {
    .btb-tipRow {
        padding: 10px 12px;
    }

    .btb-tipRow.is-locked .btb-lockedRow {
        min-height: 72px;
    }

    /* down from ~100 */
}

@media (min-width: 900px) {
    .btb-tipRow.is-locked .btb-lockedRow {
        background: rgba(255, 255, 255, .02);
        border: 1px dashed rgba(245, 158, 11, .25);
    }

    .btb-lockedRow__inner {
        border-width: 1px;
        padding: 10px 14px;
    }
}

@media (min-width: 900px) {
    .btb-tips-shell__top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        margin-bottom: 12px;
    }

    .btb-tips-tabs {
        gap: 10px;
    }

    .btb-tips-pills {
        gap: 10px;
    }
}





@media (min-width: 900px) {
    .btb-meta__comp {
        font-size: 12px;
    }

    .btb-meta__country {
        font-size: 11px;
        opacity: .8;
    }

    .btb-dtPill {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (min-width: 900px) {
    .btb-tipRow {
        position: relative;
    }

    .btb-tipRow::after {
        content: "";
        position: absolute;
        top: 12px;
        bottom: 12px;
        left: calc(52px + 340px);
        /* adjust to where your left/meta ends */
        width: 1px;
        background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .06), transparent);
        opacity: .7;
        pointer-events: none;
    }
}

@media (hover:hover) and (min-width: 900px) {
    .btb-tipRow:not(.is-locked):hover {
        transform: translateY(-1px);
        border-color: rgba(34, 211, 238, .28);
    }
}

.btb-marketTitle {
    margin: 6px 0 12px;
    padding-left: 2px;

    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2px;

    color: rgba(248, 250, 252, .92);

    display: flex;
    align-items: center;
    gap: 10px;
}

/* subtle accent line */
.btb-marketTitle::before {
    content: "";
    width: 6px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(180deg, #22D3EE, #0EA5E9);
    opacity: .9;
}

/* mobile */
@media (max-width: 520px) {
    .btb-marketTitle {
        font-size: 14px;
        margin: 4px 0 10px;
    }
}

.btb-tips-tabs {
    margin-bottom: 8px;
}

.btb-marketTitle {
    margin: 6px 0 12px;
}

.btb-flagDot {
    display: inline-block;
}