/* War Thunder's menu look, layered over site.css: its tokens are redefined from the game's own style constants and
   its components restyled after the daGUI elements they match. Values come from gui.vromfs.bin (gui/const/colors.css,
   gui/csselems/*.css, gui/tooltips/tooltip.css, gui/gamercard/gamercard.css; daGUI writes #AARRGGBB), the textures
   from ui/atlases.vromfs.bin (gameuiskin, a 9rect texture multiplied by its element's background-color), the fonts
   from ui/fonts.vromfs.bin (fonts.dynfont.blk). Sizes are the game's 1080p sizes scaled by 0.7 for a browser. */

@font-face {
    font-family: "WT Fira Sans Condensed";
    src: url("../game-ui/fonts/firasanscondensed-light.woff2") format("woff2");
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: "WT Fira Sans Condensed";
    src: url("../game-ui/fonts/firasanscondensed-regular.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

@font-face {
    font-family: "WT JetBrains Mono";
    src: url("../game-ui/fonts/jetbrains-mono-nl-regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

:root {
    /* ---- the game's constants, by their own names */
    --wt-frame-dark-bg: #1b2226;                  /* frameDarkBackgroundColor */
    --wt-frame-header-bg: #2d343c;                /* frameHeaderBackgroundColor */
    --wt-frame-dark-hover-bg: #282e37;            /* frameDarkHoverBgColor */
    --wt-frame-menu-border: #3a434e;              /* frameDarkMenuBorderColor */
    --wt-frame-scaleable-border: rgb(45 56 65 / 0.7); /* frameScaleableBorderColor #B22D3841 */
    --wt-frame-selected-border: #96b1b1;          /* frameDarkSelectedBorderColor */
    --wt-window-bg: #111821;                      /* frameDarkTransparentBgColor #CC111821, opaque */
    --wt-bottom-bar-bg: #161c23;                  /* bottomBarBackgroundColor */
    --wt-bottom-bar-line: #3d4a52;                /* bottomBarForegroundColor */
    --wt-modal-shade: rgb(2 6 11 / 0.87);         /* modalShadeColor #DD02060B */
    --wt-modal-border: #51626b;                   /* modalInfoBorderColor */
    --wt-modal-top-line: #6b7e85;                 /* modalInfoBorderColorTopLine */

    --wt-text-active: #ffffff;                    /* activeTextColor */
    --wt-text-common: #c0c0c0;                    /* commonTextColor */
    --wt-text-header-option: #908f8f;             /* headerOptionTextColor */
    --wt-text-minor: #808080;                     /* minorTextColor */
    --wt-text-disabled: #777777;                  /* disabledTextColor */
    --wt-text-in-white: #181818;                  /* textInWhiteBlockColor */
    --wt-link: #17cbfc;                           /* linkTextColor */
    --wt-link-hover: #84e0fa;                     /* linkTextHoverColorLight */
    --wt-warning: #dda018;                        /* warningTextColor */
    --wt-bad: #ff4b38;                            /* badTextColor */
    --wt-good: #6dc54b;                           /* contactOnlineColor */
    --wt-hero: #dda339;                           /* mainPlayerColor */
    --wt-team-blue: #527aff;                      /* teamBlueColor */
    --wt-team-red: #ff5a52;                       /* teamRedColor */
    --wt-focus: #ffd34b;                          /* gamepadFocusFrameColor */

    --wt-button: #3a474f;                         /* buttonColor, buttonBorderColor */
    --wt-button-text: #e0e0e0;                    /* buttonFontColor */
    --wt-button-hover: #e0e0e0;                   /* buttonColorHover */
    --wt-button-hover-text: #181818;              /* buttonFontColorHover */
    --wt-button-pushed: rgb(2 5 9 / 0.6);         /* buttonColorPushed #99020509 */
    --wt-button-pushed-text: #908f8f;             /* buttonFontColorPushed */
    --wt-battle-text: #d0d0d0;                    /* battleButtonColor */

    --wt-listbox-bg: rgb(3 7 12 / 0.8);           /* listboxBgColor #CC03070C */
    --wt-listbox-hover: #7d868e;                  /* listboxHoverOptionColor */
    --wt-listbox-hover-line: #e8e8e8;             /* listboxHoverOptionLineColor */
    --wt-listbox-selected: #313a41;               /* listboxSelOptionColor */
    --wt-listbox-selected-line: #96b1b1;          /* listboxSelOptionLineColor */
    --wt-header-option-selected: #b2391d;         /* headerOptionSelectedColor */

    --wt-table-header-bg: rgb(45 56 65 / 0.7);    /* tableHeaderBgColor #B22D3841 */
    --wt-row-even: rgb(8 8 8 / 0.067);            /* evenTrColor #11080808 */
    --wt-row-focus: rgb(44 44 44 / 0.2);          /* rowFocusBackgroundColor #332C2C2C */
    --wt-row-focus-line: rgb(174 174 174 / 0.78); /* rowFocusForegroundColor #C6AEAEAE */

    --wt-edit-bg: rgb(2 5 9 / 0.57);              /* editboxColor #91020509 */
    --wt-edit-border: #243640;                    /* editboxBorderColor */
    --wt-edit-focus-bg: rgb(2 5 9 / 0.6);         /* editboxColorFocus */
    --wt-edit-focus-border: #3e4b52;              /* editboxBorderColorFocus */
    --wt-edit-hint: #555555;                      /* editboxHintColor */
    --wt-check-bg: #0d1116;                       /* checkboxBgColor */
    --wt-check-border: #3e4b52;                   /* checkboxBorderColor */
    --wt-check-hover-border: #6d7974;             /* checkboxHoveredBorderColor */
    --wt-scroll-track: rgb(44 44 44 / 0.2);       /* scrollbarBgColor #332c2c2c */
    --wt-scroll-thumb: #908f8f;                   /* scrollbarSliderColor */

    --wt-font: "WT Fira Sans Condensed", "Fira Sans Condensed", "Arial Narrow", sans-serif;
    --wt-mono: "WT JetBrains Mono", ui-monospace, monospace;
    /* fonts.dynfont.blk at 1080p (px) x 0.7: tiny_text 18, small_text 23, small_accented 25, medium 28, big 38 */
    --wt-size-tiny: 0.8125rem;
    --wt-size-normal: 1rem;
    --wt-size-accented: 1.0625rem;
    --wt-size-medium: 1.25rem;
    --wt-size-big: 1.625rem;
    --wt-block: 6px;                              /* blockInterval, framePadding: 6 at 1080p */

    /* ---- site.css's tokens, from the above */
    --bg: var(--wt-window-bg);
    --surface: var(--wt-frame-dark-bg);
    --text: var(--wt-text-common);
    --muted: var(--wt-text-header-option);
    --border: var(--wt-frame-scaleable-border);
    --accent: var(--wt-frame-selected-border);
    --accent-text: var(--wt-text-in-white);
    --notice-bg: rgb(221 160 24 / 0.1);
    --notice-border: var(--wt-warning);
    --radius: 0;
    --danger: var(--wt-bad);
    --ok: var(--wt-good);
    --grid: #2a3238;
    --heat: var(--wt-team-blue);
    /* Chart slots: the game's colours (teamBlue, progressBarRed, usageRating 0/2/1, mySquad, cardItemName,
       usageRating 3), those too light for a chart moved into the dark band with their hue kept, in an order that
       passes the colour-vision checks against the panel. */
    --series-1: #527aff;
    --series-2: #d84931;
    --series-3: #c532d2;
    --series-4: #3e9e2f;
    --series-5: #0aa0ce;
    --series-6: #c0851d;
    --series-7: #6e75ff;
    --series-8: #44ab51;
    /* Chart.js (charts.js): the game's tooltip and square bars. */
    --chart-tip-bg: var(--wt-frame-header-bg);
    --chart-tip-border: var(--wt-frame-menu-border);
    --chart-tip-title: var(--wt-text-active);
    --chart-tip-text: var(--wt-text-common);
    --chart-bar-radius: 0;
}

/* ---------------------------------------------------------------- base */

body {
    background: var(--bg);
    color: var(--text);
    font: 300 var(--wt-size-normal) / 1.45 var(--wt-font);
    scrollbar-color: var(--wt-scroll-thumb) var(--wt-scroll-track);
}

::selection {
    background: var(--wt-frame-selected-border);
    color: var(--wt-text-in-white);
}

strong,
b,
th {
    font-weight: 400;
}

h1,
h2,
h3 {
    color: var(--wt-text-active);
    font-weight: 400;
}

h1 {
    font-size: var(--wt-size-big);
}

h2 {
    font-size: var(--wt-size-medium);
}

code {
    font-family: var(--wt-mono);
}

a {
    color: var(--wt-link);
    text-decoration-color: rgb(23 203 252 / 0.45);
    text-underline-offset: 2px;
}

a:hover {
    color: var(--wt-link-hover);
}

:focus-visible {
    outline: 2px solid var(--wt-focus);
    outline-offset: 1px;
}

/* ---------------------------------------------------------------- header: the gamercard bar */

/* TopMenuPanelBg: gameuiskin#top_bar, 9rect 1,6,1,2 - the red line along its top. */
.topbar {
    border: solid transparent;
    border-width: 6px 1px 2px;
    border-image: url("../game-ui/tex/top-bar.png") 6 1 2 1 fill stretch;
    background: var(--wt-bottom-bar-bg);
    padding: 0.55rem 1.25rem 0.6rem;
}

.brand {
    color: var(--wt-text-active);
    font-size: var(--wt-size-medium);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.brand-sub {
    color: var(--wt-text-minor);
    font-size: var(--wt-size-normal);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.account {
    color: var(--wt-text-common);
}

/* ---------------------------------------------------------------- tabs: HorizontalListBox > shopFilter */

.sections {
    background: var(--wt-listbox-bg);
    border-bottom: 1px solid var(--wt-bottom-bar-line);
}

.sections ul {
    gap: 1px;                                      /* listboxItemsInterval */
    padding: 0 0.75rem;
}

.sections a,
.tabs a {
    color: var(--wt-text-common);
    background: transparent;
    border-bottom: 2px solid transparent;
    transition: none;
}

.sections a {
    padding: 0.55rem 1rem 0.5rem;                  /* listboxHPadding 0.015@sf */
}

.sections a:hover,
.tabs a:hover {
    background: var(--wt-listbox-hover);
    border-bottom-color: var(--wt-listbox-hover-line);
    color: var(--wt-text-in-white);
}

.sections a.current,
.tabs a.current {
    background: var(--wt-listbox-selected);
    border-bottom-color: var(--wt-listbox-selected-line);
    color: var(--wt-text-active);
    font-weight: 400;
}

.tabs {
    gap: 1px;
    background: var(--wt-listbox-bg);
    border-bottom: 1px solid var(--wt-bottom-bar-line);
}

.tabs a {
    padding: 0.5rem 0.9rem;
}

.tabs a:hover .count {
    color: var(--wt-text-in-white);
}

/* The range switcher: HorizontalListBox[type=transparent], whose selected option is a button with the header's
   orange line under it. */
.segmented {
    gap: 1px;
    border: 0;
    background: var(--wt-listbox-bg);
}

.segmented a {
    background: transparent;
    color: var(--wt-text-common);
    border-bottom: 2px solid transparent;
    padding: 0.4rem 1rem 0.3rem;
}

.segmented a + a {
    border-left: 0;
}

.segmented a:hover {
    color: var(--wt-text-active);
}

.segmented a.current {
    background: var(--wt-button);
    color: var(--wt-text-active);
    border-bottom-color: var(--wt-header-option-selected);
    font-weight: 400;
}

/* ---------------------------------------------------------------- panels: frameBlock_dark */

.card,
.tile,
.filters,
.table-wrap,
.chart,
.action-card,
.notice,
.flash,
.placeholder,
.results li a,
.names li {
    border-radius: 0;
}

.card,
.tile,
.filters,
.table-wrap,
.chart,
.action-card {
    background: var(--wt-frame-dark-bg);
    border: 1px solid var(--wt-frame-scaleable-border);
}

/* frame_header: a chart's or an action's title on the header colour, across the top of its panel. */
.chart figcaption,
.chart > h2,
.action-card h2 {
    margin: -0.9rem -1rem 0.75rem;
    padding: 0.45rem 1rem;
    background: var(--wt-frame-header-bg);
    color: var(--wt-text-active);
    font-weight: 400;
}

.tile {
    position: relative;
    padding: 0.6rem 0.8rem 0.65rem;
}

.tile-label {
    color: var(--wt-text-minor);
    font-size: var(--wt-size-tiny);
    font-weight: 400;
    letter-spacing: 0.06em;
}

.tile-value {
    color: var(--wt-text-active);
    font-size: var(--wt-size-big);
    font-weight: 300;
    line-height: 1.2;
}

.tile-value.tile-text {
    font-size: var(--wt-size-medium);
}

.tile-note {
    color: var(--wt-text-minor);
}

a.tile-link:hover,
a.tile-link:focus-visible {
    background: var(--wt-frame-dark-hover-bg);
    border-color: var(--wt-frame-selected-border);
}

/* The leaderboard's icons (gameuiskin#lb_*, ban_icon, chat, ...) on the tiles that name one. */
.tile[data-icon]::after {
    content: "";
    position: absolute;
    top: 0.55rem;
    right: 0.6rem;
    width: 1.6rem;
    height: 1.6rem;
    background: var(--wt-text-minor);
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
    opacity: 0.8;
}

a.tile-link[data-icon]:hover::after {
    background: var(--wt-text-common);
}

[data-icon="players"] { --icon: url("../game-ui/icons/players.svg"); }
[data-icon="kills"] { --icon: url("../game-ui/icons/kills.svg"); }
[data-icon="ground-kills"] { --icon: url("../game-ui/icons/ground-kills.svg"); }
[data-icon="deaths"] { --icon: url("../game-ui/icons/deaths.svg"); }
[data-icon="ban"] { --icon: url("../game-ui/icons/ban.svg"); }
[data-icon="kick"] { --icon: url("../game-ui/icons/kick.svg"); }
[data-icon="warning"] { --icon: url("../game-ui/icons/warning.svg"); }
[data-icon="chat"] { --icon: url("../game-ui/icons/chat.svg"); }
[data-icon="time"] { --icon: url("../game-ui/icons/time.svg"); }
[data-icon="elo"] { --icon: url("../game-ui/icons/elo.svg"); }
[data-icon="report"] { --icon: url("../game-ui/icons/report.svg"); }
[data-icon="fighter"] { --icon: url("../game-ui/icons/fighter.svg"); }
[data-icon="mail"] { --icon: url("../game-ui/icons/mail.svg"); }

.notice {
    background: var(--notice-bg);
    border: 0;
    border-left: 3px solid var(--wt-warning);
}

.flash {
    background: var(--wt-frame-dark-bg);
    border: 0;
    border-left: 3px solid;
}

.flash-done {
    border-left-color: var(--wt-good);
}

.flash-refused {
    border-left-color: var(--wt-bad);
}

.placeholder {
    border-color: var(--wt-frame-menu-border);
}

/* The player card's avatar (gui/playertooltip.tpl contactAvatar: a 176 px frameDarkBackgroundColor square holding the
   166 px image, the image stretched whole as bhvAvatar's isFull draws it). */
.player-avatar {
    background: var(--wt-frame-dark-bg);
}

.names li,
.results li a {
    background: var(--wt-frame-dark-bg);
    border-color: var(--wt-frame-scaleable-border);
}

.results li a:hover {
    background: var(--wt-frame-dark-hover-bg);
    border-color: var(--wt-frame-selected-border);
}

/* ---------------------------------------------------------------- tables: table.lbTable */

table.data {
    font-size: var(--wt-size-normal);
}

table.data th,
table.data td {
    border-bottom: 1px solid rgb(255 255 255 / 0.04);
    padding: 0.42rem 0.75rem;
}

table.data th {
    background: var(--wt-table-header-bg);
    color: var(--wt-text-common);
    font-size: var(--wt-size-tiny);
    font-weight: 400;
    letter-spacing: 0.05em;
}

table.data tbody tr:nth-child(even) {
    background: var(--wt-row-even);
}

/* tr[_needHighLight=yes]: the row under the pointer, with its 1px line beneath. */
table.data tbody tr:hover {
    background: var(--wt-row-focus);
    box-shadow: inset 0 -1px 0 var(--wt-row-focus-line);
}

table.data tr.mark {
    background: rgb(221 163 57 / 0.12);
}

table.data tr.mark > td:first-child {
    box-shadow: inset 3px 0 0 var(--wt-hero);
}

table.data tr.row-off td {
    color: var(--wt-text-disabled);
}

/* ---------------------------------------------------------------- badges */

.tag {
    border: 0;
    border-radius: 2px;
    background: var(--wt-frame-header-bg);
    color: var(--wt-text-common);
    font-size: var(--wt-size-tiny);
    font-weight: 400;
    letter-spacing: 0.03em;
    padding: 0.05rem 0.5rem;
}

.tag-ban {
    background: rgb(255 75 56 / 0.16);
    color: var(--wt-bad);
}

.tag-unban {
    background: rgb(109 197 75 / 0.14);
    color: var(--wt-good);
}

.tag-next {
    background: rgb(221 163 57 / 0.16);
    color: var(--wt-hero);
}

/* ---------------------------------------------------------------- buttons */

/* The main action: Button_text.battle - gameuiskin#button_bright_ x #ffb867, 9rect 3,7,3,7; brighter textures on
   hover and push. */
.button {
    border: solid transparent;
    border-width: 7px 3px;
    border-image: url("../game-ui/tex/btn-battle.png") 7 3 fill / 7px 3px stretch;
    border-radius: 0;
    background: transparent;
    color: var(--wt-battle-text);
    font: 400 var(--wt-size-accented) / 1.3 var(--wt-font);
    padding: 0.05rem 1.1rem;
    text-shadow: 0 0 4px rgb(0 0 0 / 0.6);
}

.button:hover {
    filter: none;
    border-image-source: url("../game-ui/tex/btn-battle-hover.png");
    color: var(--wt-text-active);
}

.button:active {
    border-image-source: url("../game-ui/tex/btn-battle-active.png");
    color: #e0e0e0;                                /* pushedBattleButtonColor */
}

/* The red the battle button turns to leave a queue: button_bright_ x #ff1414. */
.button.danger {
    border-image-source: url("../game-ui/tex/btn-red.png");
    background: transparent;
}

.button.danger:hover {
    border-image-source: url("../game-ui/tex/btn-red-hover.png");
}

.button.danger:active {
    border-image-source: url("../game-ui/tex/btn-red-active.png");
}

/* An ordinary button: Button_text - flat, and white with dark text under the pointer. */
.button.small-button {
    border: 1px solid var(--wt-button);
    border-image: none;
    background: var(--wt-button);
    color: var(--wt-button-text);
    font-size: var(--wt-size-normal);
    padding: 0.3rem 0.9rem;
    text-shadow: none;
}

.button.small-button:hover {
    background: var(--wt-button-hover);
    border-color: var(--wt-button-hover);
    color: var(--wt-button-hover-text);
}

.button.small-button:active {
    background: var(--wt-button-pushed);
    border-color: rgb(7 9 11 / 0.6);
    color: var(--wt-button-pushed-text);
}

.button.small-button.danger {
    border-color: transparent;
    border-width: 7px 3px;
    border-image: url("../game-ui/tex/btn-red.png") 7 3 fill / 7px 3px stretch;
    background: transparent;
    color: var(--wt-battle-text);
    padding: 0 0.9rem;
    text-shadow: 0 0 4px rgb(0 0 0 / 0.6);
}

.button.small-button.danger:hover {
    border-image-source: url("../game-ui/tex/btn-red-hover.png");
    color: var(--wt-text-active);
}

/* The second choice: Button_text[visualStyle=common] - gameuiskin#button_flat_*, 9rect 3,4,3,4. */
.button.secondary,
.button.small-button.secondary {
    border: solid transparent;
    border-width: 4px 3px;
    border-image: url("../game-ui/tex/btn.png") 4 3 fill / 4px 3px stretch;
    background: transparent;
    color: var(--wt-text-common);
    text-shadow: none;
}

.button.secondary {
    padding: 0.2rem 1.1rem;
}

.button.small-button.secondary {
    padding: 0.05rem 0.9rem;
}

.button.secondary:hover {
    border-image-source: url("../game-ui/tex/btn-hover.png");
    background: transparent;
    color: var(--wt-text-active);
}

.button.secondary:active {
    border-image-source: url("../game-ui/tex/btn-active.png");
    border-image-slice: 3 2 fill;
    color: var(--wt-text-common);
}

.button:disabled,
.button[aria-disabled="true"] {
    border-image-source: url("../game-ui/tex/btn-disabled.png");
    border-image-slice: 4 3 fill;
    color: var(--wt-text-disabled);
    cursor: default;
}

.link-button {
    color: var(--wt-link);
}

.link-button:hover {
    color: var(--wt-link-hover);
}

/* ---------------------------------------------------------------- form inputs: EditBox, ComboBox, CheckBox */

.filters input[type="text"],
.filters input[type="search"],
.filters input[type="date"],
.filters input[type="datetime-local"],
.filters input[type="time"],
.filters select,
.action-form input:not([type="radio"]):not([type="checkbox"]),
.action-form select,
.action-form textarea,
.announcement-form input:not([type="radio"]):not([type="checkbox"]),
.announcement-form select,
.add-map input:not([type="radio"]):not([type="checkbox"]) {
    background: var(--wt-edit-bg);
    border: 1px solid var(--wt-edit-border);
    border-radius: 0;
    color: var(--wt-text-common);
    font: 300 var(--wt-size-normal) / 1.3 var(--wt-font);
}

.filters input:focus,
.filters select:focus,
.action-form input:not([type="radio"]):not([type="checkbox"]):focus,
.action-form select:focus,
.action-form textarea:focus,
.announcement-form input:not([type="radio"]):not([type="checkbox"]):focus,
.add-map input:not([type="radio"]):not([type="checkbox"]):focus {
    background: var(--wt-edit-focus-bg);
    border-color: var(--wt-edit-focus-border);
    color: #e0e0e0;                                /* editboxFontColorFocus */
    outline: 0;
    box-shadow: inset 0 -2px 0 #788890;            /* editboxFgColorFocus */
}

input::placeholder,
textarea::placeholder {
    color: var(--wt-edit-hint);
}

/* gameuiskin#drop_menu_icon */
select {
    appearance: none;
    padding-right: 1.8rem !important;
    background-image: url("../game-ui/icons/drop-menu-icon.svg") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.55rem center !important;
    background-size: 0.7rem auto !important;
}

select option {
    background: #212121;                           /* comboListBgColor */
    color: #e0e0e0;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.75);
}

/* CheckBoxImg: a dark square, and gameuiskin#check.svg standing out of its top right corner. */
input[type="checkbox"] {
    appearance: none;
    flex: none;
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    background: var(--wt-check-bg);
    border: 1px solid var(--wt-check-border);
    vertical-align: middle;
    cursor: pointer;
}

input[type="checkbox"]:hover {
    border-color: var(--wt-check-hover-border);
}

input[type="checkbox"]:checked {
    background: var(--wt-check-bg) url("../game-ui/icons/check.svg") 0.2rem -0.3rem / 1.15rem no-repeat;
}

/* RadioButtonImg: gameuiskin#radiobutton_* */
input[type="radio"] {
    appearance: none;
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    background: url("../game-ui/icons/radiobutton-unchecked.svg") center / contain no-repeat;
    vertical-align: middle;
    cursor: pointer;
}

input[type="radio"]:hover {
    background-image: url("../game-ui/icons/radiobutton-unchecked-hover.svg");
}

input[type="radio"]:checked {
    background-image: url("../game-ui/icons/radiobutton-checked.svg");
}

input[type="radio"]:checked:hover {
    background-image: url("../game-ui/icons/radiobutton-checked-hover.svg");
}

.toggle-link::before {
    border-radius: 0;
    border-color: var(--wt-check-border);
    background: var(--wt-check-bg);
}

.toggle-link.on::before {
    content: "";
    border-color: var(--wt-check-border);
    background: var(--wt-check-bg) url("../game-ui/icons/check.svg") 0.2rem -0.3rem / 1.1rem no-repeat;
}

.toggle-link:hover::before {
    border-color: var(--wt-check-hover-border);
}

/* ---------------------------------------------------------------- tooltip and modal */

/* tooltipObj: the header colour with the menu border. Chart.js's tooltips take the same from --chart-tip-*. */
.tooltip {
    background: var(--wt-frame-header-bg);
    border: 1px solid var(--wt-frame-menu-border);
    color: var(--wt-text-common);
    padding: var(--wt-block);
    font-size: var(--wt-size-normal);
}

/* modalInfoHolder: its border, the lighter line along its top, and the modal shade behind. */
.confirm-dialog {
    border: 1px solid var(--wt-modal-border);
    border-radius: 0;
    background: var(--wt-frame-dark-bg);
    box-shadow: inset 0 1px 0 var(--wt-modal-top-line), 0 0.5rem 2.5rem rgb(0 0 0 / 0.6);
}

.confirm-dialog::backdrop {
    background: var(--wt-modal-shade);
}

.confirm-dialog h2 {
    margin: -1.5rem -1.5rem 1rem;
    padding: 0.6rem 1.5rem;
    background: var(--wt-frame-header-bg);
}

/* ---------------------------------------------------------------- the rest */

.heatmap td,
.heat-legend i {
    border-radius: 0 !important;
}

.status-dot {
    border-radius: 0;
    transform: rotate(45deg) scale(0.85);
}

.room-now[data-state="InBattle"] .status-dot { background: var(--wt-good); }
.room-now[data-state="NoBattle"] .status-dot { background: var(--wt-warning); }
.room-now[data-state="NotConnected"] .status-dot { background: var(--wt-bad); }

.banned {
    color: var(--wt-bad);
}

@media (max-width: 40rem) {
    .confirm-dialog {
        border-width: 1px 0 0;
        border-radius: 0;
    }

    .confirm-dialog h2 {
        margin: -1.25rem -1rem 1rem;
        padding: 0.6rem 1rem;
    }

    .sections a {
        padding: 0.55rem 0.8rem 0.5rem;
    }
}

/* icon_primary_attention is drawn in colour, as the game shows it. */
.tile[data-icon="warning"]::after {
    -webkit-mask: none;
    mask: none;
    background: var(--icon) center / contain no-repeat;
}

/* Names in a list read as text, as the game's lists do; underlined under the pointer. */
table.data a,
.results a,
.section-head a,
.pager a {
    text-decoration: none;
}

table.data a:hover,
.results a:hover,
.section-head a:hover,
.pager a:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------------------- the players page's lobby list */

/* The game's custom-room player list (gui/mplobby/mplobby.blk, playerslist.tpl; scripts statistics/mpstatisticsutil.nut,
   matchingrooms/mroomplayerslistwidget.nut): an optionlist_line_right header bar "Player List (n/max)", then one
   table.mpTable of team | country | clan tag and name | state, in a scrollBox 12 rows16 high. 1080p sizes x 0.7:
   baseTrHeight 41, tableIcoSize 30, tablePad 5, rows16height 32, scrollBarVisibleSize 8. Colours with an alpha are
   daGUI's premultiplied #AARRGGBB, written here unpremultiplied. */
.lobby {
    --lobby-row: 28.7px;                          /* baseTrHeight */
    --lobby-ico: 21px;                            /* tableIcoSize */
    --lobby-pad: 3.5px;                           /* tablePad */
    margin: 0 0 1.5rem;
}

.lobby-header {
    display: flex;
    align-items: center;
    height: var(--lobby-row);
    padding-left: 14.5px;                         /* padding 1@scrn_tgt/100 + the caption's left:10 */
    /* gameuiskin#optionlist_background_right, 9rect 0,4, x optionListLineColor #BB888888 */
    border-style: solid;
    border-width: 3px 0;
    border-image: url("../game-ui/tex/list-header.png") 4 0 fill / 3px 0 stretch;
}

.lobby-header h2 {
    margin: 0;
    font-size: var(--wt-size-medium);             /* caption: medium_text (Fira Sans Condensed Light), white */
    font-weight: 300;
    line-height: 1;
    color: var(--wt-text-active);
}

.lobby-empty {
    margin: var(--wt-block) 0 0;
    padding: 0 var(--lobby-pad);
}

.lobby-scroll {
    margin-top: var(--wt-block);
    max-height: max(274px, var(--lobby-fill, 0px));  /* 12*@rows16height+7, or down to the window's bottom (site.js) */
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #908f8f rgb(220 220 220 / 0.2);
}

/* Chrome draws ::-webkit-scrollbar only while scrollbar-width and -color are auto (body sets the colour). */
@supports selector(::-webkit-scrollbar) {
    .lobby-scroll {
        scrollbar-width: auto;
        scrollbar-color: auto;
    }

    .lobby-scroll::-webkit-scrollbar {
        width: 6px;                               /* scrollBarVisibleSize */
    }

    .lobby-scroll::-webkit-scrollbar-track {
        background: rgb(220 220 220 / 0.2);       /* scrollbarBgColor #332c2c2c */
    }

    .lobby-scroll::-webkit-scrollbar-thumb {
        background: #908f8f;                      /* ScrollSlider: scrollbarSliderColor */
    }

    .lobby-scroll::-webkit-scrollbar-thumb:hover {
        background: #e0e0e0;
    }

    .lobby-scroll::-webkit-scrollbar-button {
        display: none;
    }
}

.lobby-scroll:focus-visible {
    outline: 1px solid var(--wt-focus);
    outline-offset: 1px;
}

.lobby-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0;
}

.lobby-table tr {
    height: var(--lobby-row);
}

.lobby-table tr[data-even="yes"] {
    background: rgb(120 120 120 / 0.067);         /* evenTrColor #11080808 */
}

.lobby-table tr:hover {
    background: rgb(255 255 255 / 0.094);         /* rowHoverBackgroundColor #18181818 */
}

.lobby-table td {
    height: var(--lobby-row);
    padding: 0;
    border: 0;
    vertical-align: middle;
    text-align: center;
}

/* size ph,ph; the first cell and the last one wider by tablePad */
.lobby-table .lobby-team {
    width: calc(var(--lobby-row) + var(--lobby-pad));
    padding-left: var(--lobby-pad);
}

.lobby-country {
    width: var(--lobby-row);
}

.lobby-table .lobby-status {
    width: calc(var(--lobby-row) + var(--lobby-pad));
    padding-right: var(--lobby-pad);
}

/* teamImg: "?" in tiny_text when no team; A and B as the allies and axis logos, their letters hidden; blue for the
   viewer's (the bot's) team, red for the other, white when it has none. */
.lobby-team-ico {
    display: inline-block;
    width: var(--lobby-ico);
    height: var(--lobby-ico);
    line-height: var(--lobby-ico);
    font-size: var(--wt-size-tiny);
    color: var(--wt-text-common);
    vertical-align: middle;
}

.lobby-team:is([data-team="a"], [data-team="b"]) .lobby-team-ico {
    color: transparent;
    background: #ffffff;
    -webkit-mask: var(--team) center / contain no-repeat;
    mask: var(--team) center / contain no-repeat;
}

.lobby-team[data-team="a"] { --team: url("../game-ui/icons/team-a.svg"); }
.lobby-team[data-team="b"] { --team: url("../game-ui/icons/team-b.svg"); }

.lobby-table[data-player-team="a"] [data-team="a"] .lobby-team-ico,
.lobby-table[data-player-team="b"] [data-team="b"] .lobby-team-ico {
    background: var(--wt-team-blue);
}

.lobby-table[data-player-team="a"] [data-team="b"] .lobby-team-ico,
.lobby-table[data-player-team="b"] [data-team="a"] .lobby-team-ico {
    background: var(--wt-team-red);
}

.lobby-country img {
    display: inline-block;
    width: var(--lobby-ico);
    height: calc(0.66 * var(--lobby-ico));
    object-fit: contain;
    vertical-align: middle;
}

/* textareaNoTab, fw wide, padding tablePad, cut short (pare-text); commonTextColor */
.lobby-table .lobby-name {
    padding: 0 var(--lobby-pad);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--wt-size-normal);
    color: var(--wt-text-common);
}

.lobby-name a {
    color: inherit;
    text-decoration: none;
}

.lobby-name a:hover {
    text-decoration: underline;
}

.lobby-table tr[data-spectator="yes"] .lobby-name {
    color: var(--wt-text-minor);                  /* spectatorColor #808080 */
}

/* playerStateIcon: gameuiskin#player_* multiplied by the state's colour */
.lobby-state {
    display: inline-block;
    width: var(--lobby-ico);
    height: var(--lobby-ico);
    vertical-align: middle;
    background: #ffffff;
    -webkit-mask: var(--state) center / contain no-repeat;
    mask: var(--state) center / contain no-repeat;
}

.lobby-state[data-icon="ready"] { --state: url("../game-ui/icons/player-ready.svg"); }
.lobby-state[data-icon="not-ready"] { --state: url("../game-ui/icons/player-not-ready.svg"); }
.lobby-state[data-icon="in-game"] { --state: url("../game-ui/icons/player-in-game.svg"); background: #e0e0e0; }
.lobby-state[data-icon="stats"] { --state: url("../game-ui/icons/player-stats.svg"); }
.lobby-state[data-icon="spectator"] { --state: url("../game-ui/icons/player-spectator.svg"); }

.lobby-state[data-tint="ready"] { background: #54ce03; }      /* playerReadyColor */
.lobby-state[data-icon="ready"][data-tint="ready"] { background: #139a01; } /* its own #3abf56 x #54ce03 */
.lobby-state[data-tint="not-ready"] { background: #d93e3e; }  /* playerNotReadyColor */
.lobby-state[data-tint="stats"] { background: #e83f29; }      /* playerStatsColor */
