/* =============================================================================
   css/screens/login.css
   Layout of the login screen only (AUTH-01, AUTH-02). Tiles on the left, the
   PIN pad on the right, on the tablet; stacked on a phone.

   Positioning only. The tiles, the dots and the pad are styled in
   components.css; every value here is a token (docs/05-ux-spec.md section 8).
   ============================================================================= */

.login {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: start;
  min-height: 100%;
}

.login__title {
  margin-bottom: var(--space-4);
}

.login__tiles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.login__note {
  margin-top: var(--space-4);
}

/* The right hand panel keeps the same width whether it holds the hint or
   the pad, so nothing jumps when a tile is tapped. */
.login__pad {
  width: 320px;
  min-height: 520px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.login__hint {
  padding-top: var(--space-6);
}

.login__pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
}

.login__who {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  align-self: stretch;
}

.login__who-mark {
  width: 48px;
  height: 48px;
  margin-bottom: 0;
  font-size: var(--text-body);
}

.login__who-name {
  font-size: var(--text-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
}

/* One line, kept in the layout even when empty, so the pad does not move
   when "Wrong PIN" appears. */
.login__feedback {
  min-height: var(--text-body);
  font-size: var(--text-body);
  color: var(--color-danger);
  text-align: center;
}

.login__back {
  align-self: stretch;
}

/* Phone: one column. Tiles first; once one is tapped the tiles step aside
   and the pad takes the screen, with "Not you? Go back" to return. That keeps
   the pad in view without scrolling (the counter rule, even on a phone). */
@media (max-width: 480px) {
  .login {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .login[data-selected] .login__people {
    display: none;
  }

  .login__tiles .staff-tile {
    flex: 1 1 var(--tile-min-w);
  }

  .login__pad {
    width: 100%;
    min-height: 0;
  }

  .login__hint {
    display: none;
  }
}
