/* Спортивная линия — inc/components/sportsbook.php и sport-*.php */

.sb {
    --sb-card: #26263a;
    --sb-card-2: #303049;
    --sb-line: #34344f;
    --sb-muted: #8a8aae;
    --sb-accent: #a975ff;
    --sb-live: #ff3b5c;
    --sb-radius: 12px;
    padding-top: 16px;
    padding-bottom: 48px;
    color: #fff;
}
.sb a { color: inherit; text-decoration: none; }
.sb h1, .sb h2, .sb p { margin: 0; }

.sb-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 260px;
    gap: 16px;
    align-items: start;
}
.sb-layout > * { min-width: 0; }   /* иначе ленты со скроллом распирают колонку */

/* ---------- левое меню ---------- */
.sb-aside,
.sb-coupon {
    position: sticky;
    top: 16px;
    background: var(--sb-card);
    border-radius: var(--sb-radius);
    padding: 16px;
}
.sb-aside__live {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--sb-card-2);
    font-weight: 700;
    font-size: 14px;
}
.sb-aside__live:hover { background: var(--sb-line); }
.sb-aside__title {
    margin: 18px 0 8px !important;
    color: var(--sb-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.sb-menu { list-style: none; margin: 0; padding: 0; }
.sb-menu a {
    display: block;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #d7d7ea;
}
.sb-menu a:hover { background: var(--sb-card-2); color: #fff; }

.sb-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sb-live);
    box-shadow: 0 0 0 4px rgba(255, 59, 92, .2);
    flex: none;
}

/* ---------- центр ---------- */
.sb-main { display: grid; gap: 16px; min-width: 0; }
.sb-main > * { min-width: 0; }
.sb-title { font-size: 24px; font-weight: 700; margin-bottom: 16px !important; }

.sb-block {
    background: var(--sb-card);
    border-radius: var(--sb-radius);
    padding: 16px;
    min-width: 0;
}
.sb-block__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.sb-block__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
}

.sb-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.sb-tabs::-webkit-scrollbar { display: none; }
.sb-tab {
    flex: none;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--sb-card-2);
    color: var(--sb-muted) !important;
    font-size: 13px;
    white-space: nowrap;
}
.sb-tab:hover { color: #fff !important; }
.sb-tab--active { background: var(--sb-accent); color: #fff !important; }

/* топ-матчи: горизонтальная лента */
.sb-top {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 272px;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--sb-line) transparent;
}
.sb-match {
    scroll-snap-align: start;
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 10px;
    background: var(--sb-card-2);
}
.sb-match__head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--sb-muted);
    min-width: 0;
}
.sb-match__icon { flex: none; }
.sb-match__league { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-match__time { margin-left: auto; flex: none; }
.sb-match__teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 8px;
    text-align: center;
}
.sb-match__team { display: grid; justify-items: center; gap: 6px; min-width: 0; }
.sb-match__name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.sb-match__vs { align-self: center; color: var(--sb-muted); font-size: 12px; padding-top: 4px; }

/* строка события */
.sb-events { display: grid; }
.sb-event {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 252px;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--sb-line);
}
.sb-event:first-child { border-top: 0; padding-top: 0; }
.sb-event__info { display: grid; gap: 6px; min-width: 0; }
.sb-event__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--sb-muted);
}
.sb-event__league { display: inline-flex; align-items: center; gap: 6px; }
.sb-live {
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--sb-live);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.sb-event__clock { color: var(--sb-live); font-weight: 700; }
.sb-event__team { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
.sb-event__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-event__score { margin-left: auto; font-size: 15px; }

/* логотип команды */
.sb-logo { object-fit: contain; flex: none; }
.sb-logo--empty {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--sb-line);
    color: var(--sb-muted);
    font-size: 12px;
    font-weight: 700;
}

/* коэффициенты */
.sb-odds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sb-odd {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    padding: 9px 10px;
    border-radius: 8px;
    background: #3a3a57;
    font-size: 13px;
    transition: background .15s;
}
.sb-match .sb-odd { background: #3e3e5e; }
.sb-odd:hover { background: var(--sb-accent); }
.sb-odd__label { color: var(--sb-muted); }
.sb-odd:hover .sb-odd__label { color: #fff; }
.sb-odd__value { font-weight: 700; }

.sb-more {
    display: block;
    margin-top: 12px;
    padding: 10px;
    border-radius: 10px;
    background: var(--sb-card-2);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}
.sb-more:hover { background: var(--sb-line); }

/* популярные ставки */
.sb-bets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.sb-bet {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 10px;
    background: var(--sb-card-2);
    transition: background .15s;
}
.sb-bet:hover { background: var(--sb-line); }
.sb-bet__event { font-size: 13px; font-weight: 600; }
.sb-bet__market { font-size: 12px; color: var(--sb-muted); }
.sb-bet__odd { justify-self: start; margin-top: 4px; padding: 4px 10px; border-radius: 6px; background: var(--sb-accent); font-weight: 700; font-size: 13px; }

/* ---------- купон ---------- */
.sb-coupon__title { font-size: 16px; font-weight: 700; margin-bottom: 8px !important; }
.sb-coupon__text { color: var(--sb-muted); font-size: 13px; line-height: 1.5; }
.sb-coupon__btn {
    display: block;
    margin-top: 14px;
    padding: 11px;
    border-radius: 10px;
    background: #f0254a;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}
.sb-coupon__btn:hover { filter: brightness(1.1); }

/* ---------- адаптив ---------- */
@media (max-width: 1200px) {
    .sb-layout { grid-template-columns: 200px minmax(0, 1fr); }
    .sb-coupon { display: none; }
}
@media (max-width: 900px) {
    .sb-layout { grid-template-columns: minmax(0, 1fr); }
    .sb-aside { position: static; padding: 12px; }
    .sb-aside .sb-menu { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
    .sb-aside .sb-menu a { white-space: nowrap; background: var(--sb-card-2); }
    .sb-aside__title { margin: 12px 0 6px !important; }
}
@media (max-width: 640px) {
    .sb-title { font-size: 20px; }
    .sb-block { padding: 12px; }
    .sb-event { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .sb-top { grid-auto-columns: 240px; }
}
