/* The web lobby: the game's lobby windows (h3sw\src\h3sw\lobbyui) on a 1280 x 720 stage. Pictures
   and fonts are the mod's (web/assets, scripts/web_assets.py); every rectangle is lobby.js's, from
   web/layout.json. The fonts are COLRv1: their colours come from the palettes below, one per text
   colour of the game (assets.json "colours": 1 white, 2 the mod's yellow (game.pal 0x0b; also 1 in
   braces), 3 Heroes III's GOLD (2 in braces), 28 / 29 HD's administrator / moderator (the glyphs
   demo), 55 red, 16 / 265 ours administrator / moderator (lobbyui_layout.h), 121 the chat's time and
   date lines). */

@font-face { font-family: "H3SW Small"; src: url("/assets/small.ttf?v=25"); }
@font-face { font-family: "H3SW Small Password"; src: url("/assets/smallpw.ttf?v=25"); }
@font-face { font-family: "H3SW Med"; src: url("/assets/med.ttf?v=24"); }
@font-face { font-family: "H3SW Big"; src: url("/assets/big.ttf?v=27"); }
@font-face { font-family: "H3SW Small Shadow"; src: url("/assets/small_s.ttf?v=25"); }
@font-face { font-family: "H3SW Med Shadow"; src: url("/assets/med_s.ttf?v=24"); }
@font-face { font-family: "H3SW Big Shadow"; src: url("/assets/big_s.ttf?v=27"); }

@font-palette-values --s1 { font-family: "H3SW Small"; base-palette: 0; }
@font-palette-values --s2 { font-family: "H3SW Small"; base-palette: 1; }
@font-palette-values --s3 { font-family: "H3SW Small"; base-palette: 2; }
@font-palette-values --s28 { font-family: "H3SW Small"; base-palette: 3; }
@font-palette-values --s29 { font-family: "H3SW Small"; base-palette: 4; }
@font-palette-values --s55 { font-family: "H3SW Small"; base-palette: 5; }
@font-palette-values --s16 { font-family: "H3SW Small"; base-palette: 6; }
@font-palette-values --s121 { font-family: "H3SW Small"; base-palette: 7; }
@font-palette-values --s265 { font-family: "H3SW Small"; base-palette: 8; }
@font-palette-values --m1 { font-family: "H3SW Med"; base-palette: 0; }
@font-palette-values --m2 { font-family: "H3SW Med"; base-palette: 1; }
@font-palette-values --m3 { font-family: "H3SW Med"; base-palette: 2; }
@font-palette-values --m28 { font-family: "H3SW Med"; base-palette: 3; }
@font-palette-values --m29 { font-family: "H3SW Med"; base-palette: 4; }
@font-palette-values --m55 { font-family: "H3SW Med"; base-palette: 5; }
@font-palette-values --m16 { font-family: "H3SW Med"; base-palette: 6; }
@font-palette-values --m121 { font-family: "H3SW Med"; base-palette: 7; }
@font-palette-values --m265 { font-family: "H3SW Med"; base-palette: 8; }
@font-palette-values --b1 { font-family: "H3SW Big"; base-palette: 0; }
@font-palette-values --b2 { font-family: "H3SW Big"; base-palette: 1; }
@font-palette-values --b3 { font-family: "H3SW Big"; base-palette: 2; }
@font-palette-values --b28 { font-family: "H3SW Big"; base-palette: 3; }
@font-palette-values --b29 { font-family: "H3SW Big"; base-palette: 4; }
@font-palette-values --b55 { font-family: "H3SW Big"; base-palette: 5; }
@font-palette-values --b16 { font-family: "H3SW Big"; base-palette: 6; }
@font-palette-values --b121 { font-family: "H3SW Big"; base-palette: 7; }
@font-palette-values --b265 { font-family: "H3SW Big"; base-palette: 8; }
/* the glyphs' shadow pixels: a multiply, then a colour burn (web_assets.py shadow_fit: h2pal's shade
   row 2, which the game looks up per pixel, as the nearest line per channel) */
@font-palette-values --sm0 { font-family: "H3SW Small Shadow"; base-palette: 0; }
@font-palette-values --sm1 { font-family: "H3SW Small Shadow"; base-palette: 1; }
@font-palette-values --mm0 { font-family: "H3SW Med Shadow"; base-palette: 0; }
@font-palette-values --mm1 { font-family: "H3SW Med Shadow"; base-palette: 1; }
@font-palette-values --bm0 { font-family: "H3SW Big Shadow"; base-palette: 0; }
@font-palette-values --bm1 { font-family: "H3SW Big Shadow"; base-palette: 1; }
@font-palette-values --p1 { font-family: "H3SW Small Password"; base-palette: 0; }

html, body { margin: 0; height: 100%; overflow: hidden; background-color: #000; }
/* Native marble around the same game screen/yellow surround frame as the game. */
body { user-select: none; -webkit-user-select: none; background-image: url("/assets/marble.png?v=20"); background-repeat: repeat;
  background-size: inherit; background-position: inherit; image-rendering: pixelated; }

/* Shared native canvas with the existing game-screen artwork and its yellow frame.
   The marble outside continues the stage's tile phase. */
#stage {
  position: absolute; left: 0; top: 0; width: 1280px; height: 720px; overflow: hidden;
  transform-origin: 0 0; background: transparent;
  image-rendering: pixelated;
  font-kerning: none; font-variant-ligatures: none; letter-spacing: 0; word-spacing: 0;
  -webkit-font-smoothing: none; text-rendering: optimizeSpeed;
}
#backdrop { position: absolute; left: 0; top: 0; pointer-events: none; image-rendering: auto; transform-origin: 0 0; }
#stage * { box-sizing: border-box; }
#stage canvas, #stage img { position: absolute; display: block; image-rendering: pixelated; }

.win { position: absolute; overflow: hidden; }
.window-shadow { position: absolute; pointer-events: none; mix-blend-mode: multiply; }
.blocker { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }

/* a text item: its lines, each at the place lobbyui_render.text() puts it */
.t { position: absolute; pointer-events: none; overflow: hidden; }
.mark { position: absolute; pointer-events: none; }   /* the games list's icon marks */
.t div { position: absolute; white-space: pre; }
.t div div { left: 0; top: 0; }
.t .sm { mix-blend-mode: multiply; } .t .sb { mix-blend-mode: color-burn; }
.f0 .sm { font-family: "H3SW Small Shadow"; font-palette: --sm0; } .f0 .sb { font-family: "H3SW Small Shadow"; font-palette: --sm1; }
.f1 .sm { font-family: "H3SW Med Shadow"; font-palette: --mm0; } .f1 .sb { font-family: "H3SW Med Shadow"; font-palette: --mm1; }
.f2 .sm { font-family: "H3SW Big Shadow"; font-palette: --bm0; } .f2 .sb { font-family: "H3SW Big Shadow"; font-palette: --bm1; }
.f0 { font: 15px/15px "H3SW Small"; height: 15px; }
.f1 { font: 19px/19px "H3SW Med"; height: 19px; }
.f2 { font: 20px/20px "H3SW Big"; height: 20px; }
.f0 .c1 { font-palette: --s1; } .f0 .c2 { font-palette: --s2; } .f0 .c3 { font-palette: --s3; } .f0 .c28 { font-palette: --s28; } .f0 .c29 { font-palette: --s29; } .f0 .c55 { font-palette: --s55; } .f0 .c16 { font-palette: --s16; } .f0 .c121 { font-palette: --s121; } .f0 .c265 { font-palette: --s265; }
.f1 .c1 { font-palette: --m1; } .f1 .c2 { font-palette: --m2; } .f1 .c3 { font-palette: --m3; } .f1 .c28 { font-palette: --m28; } .f1 .c29 { font-palette: --m29; } .f1 .c55 { font-palette: --m55; } .f1 .c16 { font-palette: --m16; } .f1 .c121 { font-palette: --m121; } .f1 .c265 { font-palette: --m265; }
.f2 .c1 { font-palette: --b1; } .f2 .c2 { font-palette: --b2; } .f2 .c3 { font-palette: --b3; } .f2 .c28 { font-palette: --b28; } .f2 .c29 { font-palette: --b29; } .f2 .c55 { font-palette: --b55; } .f2 .c16 { font-palette: --b16; } .f2 .c121 { font-palette: --b121; } .f2 .c265 { font-palette: --b265; }

/* a plate (the game's buttons); a press shows the pressed plate and moves the caption by (1, 1) */
.plate { position: absolute; cursor: pointer; }
.plate:hover:not(.held):not(.disabled) canvas { filter: brightness(1.04); }
.plate.hidden { display: none; }

/* an edit box: SoD's H3DlgEdit, smalfont white on the field the window drew */
.edit {
  position: absolute; margin: 0; border: 0; outline: 0; background: transparent; padding: 0;
  font: 15px/15px "H3SW Small"; font-palette: --s1; color: #fff; caret-color: #fff;
}
.edit.pw { font-family: "H3SW Small Password"; font-palette: --p1; }
.edit.raster-edit { opacity: 0; color: transparent; -webkit-text-fill-color: transparent; caret-color: transparent; }
.edit.raster-edit::selection { color: transparent; background: transparent; }
.input-raster { position: absolute; display: block; pointer-events: none; image-rendering: auto; }
.scroll.disabled, .scroll.disabled img { cursor: default; }
.edit::selection { background: rgba(231, 202, 20, 0.35); }   /* the mod's yellow as shown (kFocusR..B) */

.check, .num { position: absolute; cursor: pointer; }
/* the focus mark of a plate or a check box (Tab; lobbyui_window.cpp Rim): a 1-pixel rim one pixel
   round it, opaque, in the lists' gold - no browser outline */
.plate, .check { outline: none; }
.plate:focus, .check:focus { outline: 1px solid var(--focus); outline-offset: 0; }
.scroll { position: absolute; width: 16px; }
.scroll.hidden { display: none; }
.scroll img { cursor: pointer; }
.hit { position: absolute; }
/* the server's shutdown countdown, over every window (lobby.js drawStop) */
.stop { position: absolute; z-index: 1000; pointer-events: none; }
/* Browser-audio icon plate, aligned inside the stage frame or the band's free lower area. */
#sound { position: fixed; transform-origin: 0 0; z-index: 2000; visibility: hidden; }
#sound canvas { display: block; image-rendering: pixelated; }
