/* The account's panels beyond the plain form (application.css has the card, fields and the characters
   table): the waitlist, the steps of signing up, the name check, and the choice of a character's
   vocation in its colours (knight red, ranger green, mage blue, as on the home page), with the health
   and mana bars in the game's own stat colours. */

.waitlist-note { color: var(--parch-2); margin: 0 0 14px; }
/* The field people never see (registrations/new): off the page, not hidden, so a bot still fills it. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin-bottom: 18px; }
.waitlist .account-meta { margin-bottom: 14px; }

/* Account, Character, Waitlist: where signing up has got to. */
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 14px; font: 700 13px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps li + li::before { content: ""; width: 18px; height: 1px; background: var(--line-gold); }
.steps .done { color: var(--parch-2); }
.steps [aria-current="step"] { color: var(--gold); }

.name-status { min-height: 1.4em; font-size: 15px; font-weight: 700; color: var(--dim); }
.name-status[data-state="free"] { color: var(--ok); }
.name-status[data-state="taken"] { color: #ffb3a6; }
.field input[aria-invalid="true"] { border-color: var(--bad); }

.vocation-choice { display: grid; gap: 10px; border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.vocation-choice legend { font-weight: 800; padding: 0; margin-bottom: 6px; }
.vocation-choice .hint { color: var(--dim); font-size: 14px; margin-bottom: 4px; }
.vocation-option.knight { --voc: var(--hp); --voc-hi: #f6a091; }
.vocation-option.ranger { --voc: var(--ok); --voc-hi: #b4eb9f; }
.vocation-option.mage { --voc: var(--mp); --voc-hi: #a7c6f6; }
.vocation-option {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 12px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out);
}
.vocation-option:hover { border-color: color-mix(in srgb, var(--voc) 55%, transparent); }
.vocation-option:has(:checked) {
  border-color: var(--voc-hi);
  background: color-mix(in srgb, var(--voc) 12%, var(--ink));
}
.vocation-option:has(:focus-visible) { outline: 2px solid var(--gold); outline-offset: 1px; }
.vocation-option-head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
/* The whole card picks its vocation, not just the line with the button. */
.vocation-option-head::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.vocation-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--voc); }
.vocation-option-mark { width: 28px; height: 28px; color: var(--voc-hi); }
.vocation-option-text { display: grid; gap: 2px; }
.vocation-option-name { font: 700 22px/1.1 var(--display); color: var(--parch); }
.vocation-option-role { color: var(--dim); font-size: 14px; }

.vocation-details { display: grid; gap: 12px; font-size: 14px; }
.vocation-details dl { margin: 0; }
.vocation-details dd { margin: 0; }

.vocation-stats { display: grid; gap: 6px; }
.vocation-stats div { display: grid; grid-template-columns: 6.5em 1fr; align-items: center; gap: 10px; }
.vocation-stats dt { color: var(--parch-2); font-weight: 700; }
.vocation-stats dd { display: grid; grid-template-columns: 1fr 6.5em; align-items: center; gap: 10px; color: var(--parch); font-variant-numeric: tabular-nums; }
.vocation-stats .health { --stat: var(--hp); }
.vocation-stats .mana { --stat: var(--mp); }
.meter { height: 6px; border-radius: 999px; background: rgba(226, 206, 150, .1); overflow: hidden; }
.meter-fill { display: block; width: var(--fill); height: 100%; border-radius: inherit; background: var(--stat); }

.vocation-skills { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.vocation-skills div { display: grid; grid-template-columns: 8.5em 1fr; gap: 10px; }
.vocation-skills dt { color: var(--dim); }
.vocation-skills dd { color: var(--parch); font-weight: 700; }
.vocation-skills .quickly dd { color: var(--voc-hi); }

/* Spells, kit and promotions show for the vocation chosen. */
.vocation-more { display: none; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.vocation-option:has(:checked) .vocation-more { display: grid; }
.vocation-more p { margin: 0; color: var(--parch-2); font-size: 15px; }
.vocation-more dl { display: grid; gap: 8px; }
.vocation-more dl > div { display: grid; grid-template-columns: 8.5em 1fr; gap: 10px; }
.vocation-more dt { color: var(--dim); }
.vocation-more dd { color: var(--parch); }
.vocation-more ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.vocation-more strong { color: var(--voc-hi); }
.spell-level { color: var(--dim); font-size: 13px; }
.vocation-note { margin: 2px 0 0; color: var(--dim); font-size: 13px; }

@media (max-width: 420px) {
  .vocation-skills div { grid-template-columns: 7.6em 1fr; }
  .vocation-more dl > div { grid-template-columns: 1fr; gap: 0; }
  .vocation-stats div { grid-template-columns: 5.6em 1fr; }
  .vocation-stats dd { grid-template-columns: 1fr 6em; }
}

/* The waitlist's other choices (waitlists/new), where the player will play and how many friends they
   would invite: a row of buttons, the one picked in gold. */
.choice { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.choice legend { font-weight: 800; padding: 0; margin-bottom: 6px; }
.choice .hint { display: block; color: var(--dim); font-size: 14px; margin-bottom: 8px; }
.choice-options { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.choice-option {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: var(--parch);
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out), color .2s var(--ease-out);
}
/* The button itself is invisible over its label, so the whole label picks it and the form still
   says which choice is missing. */
.choice-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice-option:hover { border-color: var(--line-gold); }
.choice-option:has(:checked) { border-color: var(--gold-deep); background: color-mix(in srgb, var(--gold) 22%, var(--ink)); color: var(--gold-ink); }
.choice-option:has(:focus-visible) { outline: 2px solid var(--gold); outline-offset: 1px; }

.characters .intended { color: var(--dim); font-size: 13px; }
.characters .in-world { display: block; margin-top: 4px; font: 700 12px var(--body); letter-spacing: .04em; color: var(--ok); }

/* The friends page (friends/index): friends, requests and blocks as rows of the characters table with
   each row's changes at its end, the choice of the name friends see, and requests turned off. */
.friend-self { color: var(--gold-ink); }
.friend-add { margin: 18px 0 4px; }
.friend-empty { margin-top: 18px; }
.friend-list { margin-top: 14px; }
/* Wide enough for dates: the same columns in every list, so names and dates line up from one table to
   the next. */
@media (min-width: 640px) {
  .friend-list { table-layout: fixed; }
  .friend-list .name, .friend-list th:first-child { width: 34%; }
  .friend-list .created { width: 26%; }
}
.friend-list caption { text-align: left; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--dim); font-weight: 700; font-size: 14px; }
.characters td.friend-actions { padding-right: 0; text-align: right; }
.friend-actions form { display: inline-flex; vertical-align: middle; margin: 0 0 0 14px; }
.friend-note { color: var(--parch-2); margin: 0 0 14px; }
.friend-requests-off { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.field select {
  width: 100%;
  min-height: 50px;
  font: 500 17px var(--body);
  color: var(--parch);
  background: #fdf9ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: inset 0 2px 6px rgba(var(--shade-rgb), .12);
}
.field select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
