/* «Трансляция» on a map's page (broadcast.js): the button next to the full statistics (match-details.css
   .lp-detail-link), the panel of the series' official streams under it, and the player: over its place in the
   panel, or the window in a corner of the screen. */

.br-panel [hidden], .br-player [hidden] { display: none !important; }
.lp-detail-row.br-row { gap: calc(12px * var(--s, 1)); flex-wrap: wrap; }
.br-btn { cursor: pointer; font-family: inherit; }
.br-btn .br-tv { width: calc(18px * var(--s, 1)); height: calc(18px * var(--s, 1)); color: #a5b4fc; transform: none !important; }
.br-btn .br-chev { transition: transform .15s ease; }
.br-btn:hover .br-chev { transform: none; }
.br-btn[aria-expanded="true"] .br-chev { transform: rotate(180deg); }
.br-btn[aria-expanded="true"] { border-color: rgba(129, 140, 248, .55); color: #fff; }
/* The number of the series' streams, next to the label; none while there are none. */
.br-count {
    min-width: 1.6em;
    padding: calc(3px * var(--s, 1)) calc(6px * var(--s, 1));
    border: 1px solid rgba(99, 102, 241, .2);
    border-radius: .25rem;
    background: rgba(99, 102, 241, .1);
    color: #a5b4fc;
    font-size: max(11px, calc(12px * var(--s, 1)));
    letter-spacing: .02em;
    text-align: center;
}
.br-btn .br-count[hidden] { display: none; }

/* The panel: under the button's row, the width of the page's column. */
.br-panel {
    margin-top: calc(16px * var(--s, 1));
    padding: calc(16px * var(--s, 1));
    border: 1px solid rgba(51, 65, 85, .55);
    border-radius: .75rem;
    background: rgba(14, 21, 38, .72);
}
.br-panel[hidden] { display: none; }
.br-head { display: flex; align-items: center; gap: calc(8px * var(--s, 1)); flex-wrap: wrap; }
.br-title { margin-right: auto; color: #e2e8f0; font-size: max(12px, calc(13px * var(--s, 1))); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.br-tools { display: flex; gap: calc(8px * var(--s, 1)); }
.br-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: calc(34px * var(--s, 1));
    padding: 0 calc(12px * var(--s, 1));
    border: 1px solid rgba(51, 65, 85, .55);
    border-radius: .5rem;
    background: var(--lp-surface, #0e1526);
    color: #cbd5e1;
    font: 700 max(11px, calc(12px * var(--s, 1)))/1 inherit;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.br-icon-btn:hover { border-color: rgba(129, 140, 248, .55); color: #fff; }
.br-icon-btn svg { width: 16px; height: 16px; flex: none; }
.br-icon-btn.br-square { width: calc(34px * var(--s, 1)); padding: 0; justify-content: center; }
.br-open-plat { display: none; }

/* Languages: the page's own first, then English, then by their number of channels. */
.br-langs { display: flex; gap: calc(8px * var(--s, 1)); flex-wrap: wrap; margin-top: calc(14px * var(--s, 1)); }
.br-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: calc(32px * var(--s, 1));
    padding: 0 calc(12px * var(--s, 1));
    border: 1px solid rgba(51, 65, 85, .55);
    border-radius: .5rem;   /* as the channels' cards (the user, 04.12) */
    background: var(--lp-surface, #0e1526);
    color: #cbd5e1;
    font: 600 max(12px, calc(13px * var(--s, 1)))/1 inherit;
    cursor: pointer;
}
.br-chip b { color: #64748b; font-weight: 600; font-variant-numeric: tabular-nums; }
.br-chip:hover { border-color: rgba(129, 140, 248, .45); color: #fff; }
.br-chip[aria-pressed="true"] { border-color: rgba(129, 140, 248, .6); background: rgba(99, 102, 241, .14); color: #e0e7ff; }
.br-chip[aria-pressed="true"] b { color: #a5b4fc; }

/* The language's channels: on air first, by their viewers. */
.br-channels { display: flex; gap: calc(8px * var(--s, 1)); flex-wrap: wrap; margin-top: calc(12px * var(--s, 1)); }
.br-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    min-width: 0;
    min-height: calc(42px * var(--s, 1));
    padding: 0 calc(14px * var(--s, 1)) 0 calc(12px * var(--s, 1));
    border: 1px solid rgba(51, 65, 85, .55);
    border-radius: .5rem;
    background: var(--lp-surface, #0e1526);
    color: #e2e8f0;
    font: 600 max(13px, calc(14px * var(--s, 1)))/1 inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.br-card:hover { border-color: rgba(129, 140, 248, .45); }
.br-card.on { border-color: rgba(129, 140, 248, .75); background: rgba(99, 102, 241, .12); }
.br-card > * { flex: none; }
.br-card .br-plat { width: 18px; height: 18px; }
.br-card .br-name { flex: 0 1 auto; min-width: 0; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-lang {
    padding: 3px 5px;
    border-radius: 3px;
    background: rgba(148, 163, 184, .12);
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
}
.br-badge {
    padding: 3px 6px;
    border: 1px solid rgba(99, 102, 241, .25);
    border-radius: .25rem;
    background: rgba(99, 102, 241, .1);
    color: #a5b4fc;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.br-ext { width: 14px; height: 14px; color: #64748b; }
.br-now { color: #a5b4fc; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
/* A channel's air: its viewers with a red dot, or «не в эфире» muted. */
.br-air { display: inline-flex; align-items: center; gap: 5px; color: #cbd5e1; font-size: 12px; font-variant-numeric: tabular-nums; }
.br-air i { width: 6px; height: 6px; border-radius: 50%; background: #ef4444; }
.br-air.off { color: #64748b; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.br-card.off { opacity: .6; }
.br-card.off .br-plat, .br-card.off .br-flag { filter: grayscale(1); }
.br-wait { margin: 10px 0 0; color: #94a3b8; font-size: 13px; }
.br-empty-note { margin: 12px 0 0; color: #94a3b8; font-size: 14px; }

/* A language's flag: before its name in the row of languages and on its channels. */
.br-flag { flex: none; width: 21px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }

/* The player's place in the panel: 16:9, at most 1024 px wide. The player itself lies over it (in body, so it
   plays on when the page changes its content or the player goes into the window). */
.br-stage { margin-top: calc(14px * var(--s, 1)); }
.br-slot {
    position: relative;
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: .5rem;
    background: #070b14;
}
.br-slot-note {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 16px;
    color: #64748b;
    font-size: 13px;
    letter-spacing: .06em;
    text-align: center;
    text-transform: uppercase;
}
.br-slot-note[hidden] { display: none; }
.br-slot-note svg { width: 22px; height: 22px; flex: none; }

.br-player {
    position: absolute;
    z-index: 40;
    overflow: hidden;
    border-radius: .5rem;
    background: #000;
}
.br-player[hidden] { display: none; }
.br-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.br-bar { display: none; }

/* The window: fixed in a corner of the screen, over the page; dragged by its bar to another corner. */
.br-player.mini {
    position: fixed;
    z-index: 60;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(129, 140, 248, .35);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
    background: #0b1120;
}
.br-player.mini iframe { flex: 1; height: auto; }
.br-player.mini .br-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 6px 0 4px;
    border-bottom: 1px solid rgba(51, 65, 85, .55);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: grab;
    user-select: none;
    touch-action: none;
}
.br-player.mini.dragging .br-bar { cursor: grabbing; }
.br-player.mini.dragging iframe { pointer-events: none; }
.br-bar .br-bar-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The grip at the bar's end towards the screen's middle: left in a right corner, right (before the buttons) in a left one. */
.br-grip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 26px;
    border-radius: 6px;
    color: #64748b;
    cursor: ew-resize;
    touch-action: none;
}
.br-grip:hover { background: rgba(148, 163, 184, .12); color: #cbd5e1; }
.br-grip svg { width: 14px; height: 14px; }
.br-player.left .br-grip { order: 1; }
.br-player.left .br-bar button { order: 2; }
.br-player.mini.left .br-bar { padding-left: 10px; }
.br-bar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}
.br-bar button:hover { background: rgba(148, 163, 184, .12); color: #fff; }
.br-bar svg { width: 16px; height: 16px; }

/* The window on scrolling: a switch in the panel's head (on by default, kept in the browser). */
.br-toggle { gap: 10px; }
.br-switch {
    position: relative;
    flex: none;
    width: 28px;
    height: 16px;
    border-radius: 999px;
    background: rgba(51, 65, 85, .9);
    transition: background-color .15s ease;
}
.br-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #94a3b8;
    transition: transform .15s ease, background-color .15s ease;
}
.br-toggle[aria-checked="true"] { color: #e0e7ff; }
.br-toggle[aria-checked="true"] .br-switch { background: rgba(99, 102, 241, .75); }
.br-toggle[aria-checked="true"] .br-switch::after { transform: translateX(12px); background: #fff; }
/* Phones: the title and closing in a row; the languages in one row that scrolls; a channel to a row, its whole name
   (every one listed is official: no badge); the player; under it its tools: the switch with its words and the
   platform by its mark (no «В окне»: the window comes by scrolling, and the switch's words need the row). */
@media (max-width: 699px) {
    .br-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; padding: 12px; }
    .br-head { display: contents; }
    .br-title { grid-area: 1 / 1; align-self: center; }
    .br-close { grid-area: 1 / 2; }
    .br-wait { grid-area: 2 / 1 / 3 / -1; }
    .br-langs { grid-area: 3 / 1 / 4 / -1; flex-wrap: nowrap; margin: 12px -12px 0; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
    .br-langs::-webkit-scrollbar { display: none; }
    .br-chip { flex: none; gap: 6px; padding: 0 10px; }
    .br-channels { grid-area: 4 / 1 / 5 / -1; flex-direction: column; }
    .br-card { width: 100%; }
    .br-card .br-name { flex: 1 1 auto; max-width: none; }
    .br-card .br-badge, .br-now { display: none; }
    .br-stage { grid-area: 5 / 1 / 6 / -1; }
    .br-tools { grid-area: 6 / 1 / 7 / -1; margin-top: 10px; }
    .br-tools > * { flex: none; }
    .br-tools .br-toggle { flex: 0 1 auto; min-width: 0; margin-right: auto; }
    .br-toggle-text { overflow: hidden; text-overflow: ellipsis; }
    .br-tools .br-label, .br-tools .br-ext { display: none; }
    .br-tools .br-open-plat { display: inline-flex; }
    .br-tools [data-act="mini"] { display: none; }
    .br-tools [data-act="open"] { width: calc(34px * var(--s, 1)); padding: 0; justify-content: center; }
}
