/* Турнирные таблицы и счёт онлайн (/turnir-cedveli, /ru/turnirnye-tablicy): fb-*. Цвета — переменные сайта,
   так что светлая и тёмная тема идут за body.dark; оформление — как у прогнозов (pd-*). */
.fb { --fb-up: #12924F; --fb-playoff: #2A78D6; --fb-out: #C9CDD3; --fb-live: #E0261B; --fb-line: var(--tag-border-color); --fb-soft: var(--menu-hover-bg-color); --fb-accent: var(--main-blue-color); --fb-muted: #88909d; color: var(--main-color); padding-bottom: 24px; }
body.dark .fb { --fb-up: #3DBE77; --fb-playoff: #3987E5; --fb-out: #55606B; --fb-line: #3A4550; --fb-soft: #2B3640; }

.fb .pd-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; font-size: 13px; color: var(--fb-muted); }
.fb .pd-crumbs a { color: inherit; }
.fb .pd-crumbs a:hover { color: var(--fb-accent); }
.fb .pd-crumbs [aria-current] { color: var(--main-color); }
.fb-head { margin: 10px 0 6px; }
.fb-head h1 { font-size: 30px; line-height: 1.15; }
.fb-lead { margin: 0 0 16px; max-width: 760px; font-size: 16px; line-height: 1.55; color: var(--fb-muted); }
.fb-alert { padding: 12px 16px; border-left: 3px solid #F5A524; border-radius: 4px; background: var(--fb-soft); font-size: 14px; }

.fb-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.fb-chips::-webkit-scrollbar { display: none; }
.fb-chips a { flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--fb-line); border-radius: 6px; font-size: 14px; font-weight: 700; color: var(--main-color); white-space: nowrap; }
.fb-chips a:hover { border-color: var(--fb-accent); color: var(--fb-accent); }
.fb-chips a.is-active { background: var(--fb-accent); border-color: var(--fb-accent); color: #FFFFFF; }

.fb-block { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; min-width: 0; }
.fb-block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.fb-h2 { margin: 0; font-size: 22px; }
.fb-h2.is-small { font-size: 18px; }
.fb-h2 small { font-size: 15px; font-weight: 600; color: var(--fb-muted); }
.fb-more { font-size: 14px; font-weight: 700; color: var(--fb-accent); white-space: nowrap; }
.fb-note { margin: 0; font-size: 14px; line-height: 1.55; color: var(--fb-muted); }
.fb-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 40px; align-items: start; }
.fb-side { min-width: 0; }
.fb-leagues { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px 32px; }
.fb-league { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* матчи */
.fb-comp-games { display: flex; flex-direction: column; gap: 6px; }
.fb-comp { margin: 8px 0 0; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.fb-comp a { color: var(--fb-accent); }
.fb-day + .fb-day { margin-top: 10px; }
.fb-date { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--fb-muted); }
.fb-games { list-style: none; margin: 0; padding: 0; }
.fb-game { display: grid; grid-template-columns: 90px minmax(0, 1fr) 64px minmax(0, 1fr); align-items: center; gap: 4px 10px; padding: 10px 6px; border-bottom: 1px solid var(--fb-line); font-size: 15px; }
.fb-state { font-size: 13px; font-weight: 700; color: var(--fb-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fb-game.is-live .fb-state { color: var(--fb-live); font-weight: 800; }
.fb-game.is-live .fb-state::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--fb-live); vertical-align: 1px; animation: fb-pulse 1.6s ease-in-out infinite; }
@keyframes fb-pulse { 50% { opacity: .25; } }
.fb-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; }
.fb-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-team.is-home { justify-content: flex-end; text-align: right; }
.fb-team img { width: 24px; height: 24px; object-fit: contain; flex: none; }
.fb-score { text-align: center; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fb-game.is-scheduled .fb-score { color: var(--fb-muted); font-weight: 600; }
.fb-game.is-live .fb-score { color: var(--fb-live); }
.fb-game.is-az { background: linear-gradient(90deg, rgba(42, 37, 224, .07), transparent 70%); }
.fb-meta { grid-column: 2 / -1; font-size: 12px; color: var(--fb-muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.fb-meta a { color: var(--fb-muted); text-decoration: underline; text-underline-offset: 2px; }
.fb-meta a:hover { color: var(--fb-accent); }

/* таблица */
.fb-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fb-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.fb-table th, .fb-table td { padding: 9px 8px; border-bottom: 1px solid var(--fb-line); text-align: center; white-space: nowrap; }
.fb-table thead th { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--fb-muted); border-bottom-color: var(--main-color); }
.fb-table tbody tr:hover { background: var(--fb-soft); }
.fb-table .is-team { text-align: left; width: 100%; }
.fb-table th.is-team { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.fb-table th.is-team img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.fb-table .is-pos { width: 32px; color: var(--fb-muted); font-weight: 800; box-shadow: inset 3px 0 0 transparent; }
.fb-table tr.zone-up .is-pos { box-shadow: inset 3px 0 0 var(--fb-up); }
.fb-table tr.zone-playoff .is-pos { box-shadow: inset 3px 0 0 var(--fb-playoff); }
.fb-table tr.zone-out .is-pos { box-shadow: inset 3px 0 0 var(--fb-out); }
.fb-table tr.is-az { background: rgba(42, 37, 224, .07); }
.fb-table tr.is-az th.is-team { color: var(--fb-accent); }
.fb-table.is-mini .is-wide { display: none; }
.fb-zones { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--fb-muted); }
.fb-zones li { display: inline-flex; align-items: center; gap: 6px; }
.fb-zones i { width: 3px; height: 14px; }
.fb-zones i.zone-up { background: var(--fb-up); }
.fb-zones i.zone-playoff { background: var(--fb-playoff); }
.fb-zones i.zone-out { background: var(--fb-out); }

/* азербайджанские клубы в еврокубках */
.fb-az { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fb-az li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--fb-line); border-left: 3px solid var(--fb-accent); border-radius: 6px; }
.fb-az img { width: 36px; height: 36px; object-fit: contain; flex: none; }
.fb-az span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fb-az b { font-size: 17px; }
.fb-az a { font-size: 14px; font-weight: 700; color: var(--fb-accent); }
.fb-az small { font-size: 13px; color: var(--fb-muted); }

/* туры Премьер-лиги */
.fb-rounds { display: flex; flex-wrap: wrap; gap: 4px; }
.fb-rounds a { min-width: 34px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--fb-line); border-radius: 4px; font-size: 13px; font-weight: 700; color: var(--main-color); font-variant-numeric: tabular-nums; }
.fb-rounds a:hover { border-color: var(--fb-accent); color: var(--fb-accent); }
.fb-rounds a.is-current { border-color: var(--fb-accent); }
.fb-rounds a.is-active { background: var(--fb-accent); border-color: var(--fb-accent); color: #FFFFFF; }

/* блок в разделе «Futbol» */
.fb-teaser { margin: 4px 0 24px; padding: 16px 18px 18px; border: 1px solid var(--fb-line); border-radius: 8px; }
.fb-teaser .fb-block { margin-top: 0; }
.fb-teaser .fb-grid { gap: 16px 32px; }

/* колонки раздела и турнира липкие, прилипает короткая (как на странице новости); колонке выше
   экрана top считает football.js — она сначала доезжает до своего низа. Блок в разделе «Futbol» — без этого */
@media (min-width: 992px) {
    .fb > .fb-grid > * { position: sticky; top: 76px; align-self: start; }
}
@media (max-width: 991px) {
    .fb-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
    .fb-head h1 { font-size: 24px; }
    .fb-game { grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr); font-size: 14px; }
    .fb-state, .fb-meta { grid-column: 1 / -1; }
    .fb-team img { width: 20px; height: 20px; }
    .fb-table .is-wide { display: none; }
    .fb-leagues { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .fb-game.is-live .fb-state::before { animation: none; } }
