/* Generated by art/pixelforge/make-login.mjs (npm run art:login). Do not edit: change the script and run it again.
   The login, registration and character screens. They cover the whole page until the player is in.
   Markup: apps/client/index.html (#login). Interface classes: /ui/ui.css. Sizes are screen pixels (2 per art pixel). */
.login {
  --login-step: 6px;                                  /* one step of the title's thick letters */
  position: fixed; inset: 0; z-index: 100; overflow: auto;
  display: grid; grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1.4fr); justify-items: center; row-gap: 16px;
  padding: 20px 16px 44px; background: #1c2430;
}
.login-stage { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: linear-gradient(#27324a, #1c2430 60%, #10121a); }
.login-stage > i { position: absolute; inset: 0; }

.login-head { grid-row: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.login-logo {
  --s: var(--login-step); --h: calc(var(--login-step) / 2);
  margin: 0; font: inherit; font-size: calc(var(--login-step) * 12); line-height: calc(var(--login-step) * 13); letter-spacing: var(--s); color: #ffd43a;
  /* doubled strokes, a red drop below, then a dark edge all round */
  text-shadow: var(--s) 0 0 #ffd43a, 0 var(--s) 0 #9f211f, var(--s) var(--s) 0 #9f211f, calc(var(--s) * 2) var(--s) 0 #9f211f,
    calc(var(--h) * -1) 0 0 #1c1422, calc(var(--s) + var(--h)) 0 0 #1c1422, 0 calc(var(--h) * -1) 0 #1c1422, var(--s) calc(var(--h) * -1) 0 #1c1422,
    0 calc(var(--s) + var(--h)) 0 #1c1422, calc(var(--s) * 2) calc(var(--s) + var(--h)) 0 #1c1422;
}
.login-tagline { margin: 0; color: #fff; text-shadow: var(--ui-outline); }

.login-card { grid-row: 3; width: min(420px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; }
.login-card[hidden] { display: none; }
.login-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.login-label { color: var(--ui-dim); }
.login-row > .ui-field { width: 100%; }
.login-row > .ui-field[data-invalid="true"] { border-image-source: url(../ui/field-on.png); color: #b3261c; }
.login-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.login-check > input { width: 20px; height: 20px; margin: 0; accent-color: #d9372d; }
.login-message { padding: 4px 8px; color: #b3261c; background: #ffe1d8; outline: 2px solid var(--ui-line); overflow-wrap: anywhere; }
.login-card[data-busy="true"] { cursor: progress; }

/* the line at the foot of the screen: how the server is, and the version */
.login-foot { position: fixed; left: 12px; right: 12px; bottom: 8px; display: flex; justify-content: space-between; gap: 12px; color: #fff; text-shadow: var(--ui-outline); pointer-events: none; }
.login-server::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: #ffd23f; outline: 2px solid #1c1422; }
.login-server[data-state="online"]::before { background: #6fd35c; }
.login-server[data-state="offline"]::before { background: #e9523f; }

@media (max-height: 800px) { .login { --login-step: 4px; row-gap: 8px; padding-top: 8px; } .login-head { gap: 4px; } .login-card { gap: 6px; } }
@media (max-height: 640px) { .login-tagline { display: none; } }

/* making a character: the name, the two class cards, the five places to be born */
#character-form { width: min(540px, calc(100vw - 32px)); }
.character-classes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.character-class {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr 1fr; column-gap: 10px; align-items: center;
  margin: 0; background: none; color: var(--ui-ink); font: inherit; text-align: left; cursor: pointer; outline: none;
}
.character-class > .ui-portrait { grid-row: 1 / 3; }
.character-class-name { align-self: end; }
.character-class-blurb { align-self: start; font-size: 12px; line-height: 14px; }
.character-class:hover, .character-class:focus-visible { filter: brightness(1.05); }
.character-class[aria-checked="true"] { outline: 4px solid #f08a2c; outline-offset: -2px; border-radius: 12px; }   /* the frame's picture covers an inset shadow, so the chosen card gets an outline */
.character-class[aria-checked="true"] > .character-class-name { color: var(--ui-title); text-shadow: 2px 0 0 currentColor; }
/* three classes or more: the cards stand up (the portrait above the words) so that four share one row */
.character-classes:has(> :nth-child(3)) { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 6px; }
.character-classes:has(> :nth-child(3)) > .character-class { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; justify-items: center; row-gap: 2px; padding: 0; text-align: center; }
.character-classes:has(> :nth-child(3)) > .character-class > .ui-portrait { grid-row: auto; }
.character-classes:has(> :nth-child(3)) .character-class-name { align-self: center; }
/* the words may use part of the frame's own margin: a four-letter name (104 px) does not fit between the frame's edges otherwise */
.character-classes:has(> :nth-child(3)) :is(.character-class-name, .character-class-blurb) { margin: 0 -8px; }
.character-birthplaces { display: flex; flex-wrap: wrap; gap: 6px; }
.character-birthplaces > .ui-button { flex: 1 1 92px; min-width: 0; padding: 0 2px; }
/* a place to be born is also a party: under the place's name, the party and a chip in its color */
.character-birthplace[data-faction] { flex-direction: column; gap: 0; height: 58px; }
.character-birthplace-faction { display: flex; align-items: center; gap: 5px; font-size: 12px; line-height: 14px; }
.character-birthplace-faction::before { content: ''; flex: none; width: 8px; height: 8px; background: #fff; outline: 2px solid var(--ui-line); }
.character-birthplace[data-faction="faction_a"] > .character-birthplace-faction::before { background: #2f6fd0; }
.character-birthplace[data-faction="faction_b"] > .character-birthplace-faction::before { background: #3fa86a; }
.character-birthplace[data-faction="faction_c"] > .character-birthplace-faction::before { background: #fff; }
.character-birthplace[data-on="true"] > .character-birthplace-faction { color: var(--ui-line); text-shadow: none; }   /* the outlined white of a chosen button is too heavy at this size */

/* ------------------------------------------------------------------ look B: the street, like the game */
.login { grid-template-rows: auto auto auto minmax(0, 1fr); row-gap: 10px; padding-top: 24px; background: rgb(118 181 92); }
.login-stage { background: url(backdrop.png?v=79a650e9) center top / 2560px 1440px no-repeat; image-rendering: pixelated; }
.login-head { grid-row: 1; gap: 2px; }
.login-logo { width: 584px; max-width: calc(100vw - 16px); height: 124px; background: url(title.png?v=418738a6) center top / 584px 124px no-repeat; color: transparent; text-shadow: none; font-size: 0; line-height: 0; letter-spacing: 0; }
.login-tagline { border-style: solid; border-color: transparent; border-width: 8px; border-image: url(../ui/ghost.png) 8 fill; margin-top: -8px; padding: 0 6px; line-height: 20px; }
.login-card { grid-row: 2; }
@media (max-height: 800px) { .login { padding-top: 24px; row-gap: 8px; } }
@media (max-height: 640px) { .login-tagline { display: block; } }
