/* ==========================================================================
   STATE WARS — css/account.css
   The account screen. Borrows the menu's spacing and the panel's plating so it
   reads as the front door of this game rather than a form bolted onto it.

   Class names here are prefixed acc- on purpose: .field already belongs to the
   battlefield in battle.css, and a form label picking up grid placement meant
   for a battle arena is the sort of bug that takes an hour to see.
   ========================================================================== */

.screen--account {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.2rem, 3vh, 2.4rem);
  padding: var(--gutter);
}

.brand--compact .brand__title { font-size: clamp(2.6rem, 9vw, 5.5rem); }
.brand--compact { margin-bottom: 0; }

.account {
  width: min(30rem, 100%);
  display: flex;
  flex-direction: column;
}

.account__pane {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.account__pane[hidden] { display: none; }

.account__lead {
  margin: 0 0 .6rem;
  text-align: center;
  color: var(--c-dim);
  font-family: var(--font-ui);
  font-size: .92rem;
  line-height: 1.5;
}

/* ---------- the two forms ------------------------------------------------- */

.account__form {
  background: linear-gradient(180deg, rgba(15, 30, 53, .82), rgba(7, 13, 26, .9));
  border: 1px solid var(--c-line);
  border-radius: 14px;
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(127, 216, 255, .07);
}

.account__title {
  margin: 0 0 .4rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: .12em;
  color: var(--c-text);
  text-align: center;
}

/* ---------- one input --------------------------------------------------- */

.acc-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.acc-field__label {
  font-family: var(--font-ui);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.acc-field__hint {
  font-family: var(--font-ui);
  font-size: .74rem;
  line-height: 1.35;
  color: var(--c-muted);
}

/* The code inputs carry a button inside them, so the row is the positioned
   thing and the input simply fills what is left. */
.acc-field__wrap {
  display: flex;
  align-items: stretch;
  gap: .4rem;
}

.acc-field__wrap .acc-field__input { flex: 1 1 auto; min-width: 0; }

.acc-field__input {
  width: 100%;
  padding: .7rem .8rem;
  background: rgba(4, 7, 14, .72);
  border: 1px solid var(--c-line);
  border-radius: 9px;
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: .06em;
  transition: border-color var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}

.acc-field__input::placeholder {
  color: var(--c-muted);
  font-family: var(--font-ui);
  letter-spacing: .02em;
  opacity: .7;
}

.acc-field__input:focus {
  outline: none;
  border-color: var(--c-ice-soft);
  box-shadow: 0 0 0 3px rgba(127, 216, 255, .13);
}

.acc-field__peek {
  flex: 0 0 auto;
  padding: 0 .7rem;
  background: rgba(29, 50, 82, .5);
  border: 1px solid var(--c-line);
  border-radius: 9px;
  color: var(--c-dim);
  font-family: var(--font-ui);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out);
}

.acc-field__peek:hover { color: var(--c-text); border-color: var(--c-ice-soft); }

/* ---------- what went wrong, or right ------------------------------------ */

.account__msg {
  margin: .2rem 0 0;
  padding: .55rem .7rem;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: .84rem;
  line-height: 1.4;
  border: 1px solid transparent;
}

.account__msg[hidden] { display: none; }

.account__msg[data-kind="bad"] {
  background: rgba(255, 106, 77, .1);
  border-color: rgba(255, 106, 77, .34);
  color: #ffb9a8;
}

.account__msg[data-kind="good"] {
  background: rgba(255, 194, 92, .1);
  border-color: rgba(255, 194, 92, .34);
  color: var(--c-gold);
}

.account__msg[data-kind="busy"] {
  background: rgba(127, 216, 255, .08);
  border-color: rgba(127, 216, 255, .26);
  color: var(--c-ice);
}

/* While a request is in flight every button is disabled, so say so rather than
   leaving the screen looking simply unresponsive. */
.screen--account[data-busy="true"] { cursor: progress; }
.screen--account button:disabled { opacity: .55; cursor: progress; }

.account__form .btn { margin-top: .5rem; }

/* ---------- the settings row --------------------------------------------- */

.setting--account .setting__name b {
  color: var(--c-gold);
  font-weight: 700;
}
