/* GH #15: the temporary login page /inloggen/. Spec: specs/010-login-page/spec.md.
   This style sheet is for this page only. The values are the tokens of the StipptNOW Design System (light theme). */
:root {
  --bg: #F5F4ED;
  --surface: #FFFFFF;
  --surface-subtle: #F5F4ED;
  --ink: #15212F;
  --ink-2: #3E4A57;
  --ink-muted: #5A6672;
  --ink-placeholder: #7A8590;
  --line: rgba(21, 33, 47, 0.06);
  --line-strong: rgba(21, 33, 47, 0.14);
  --brand: #1F9E8C;
  --brand-text: #1F7A6C;
  --brand-soft: #E3F4F0;
  --danger-soft: #FCE8E6;
  --on-danger-soft: #8C1D18;
  --focus: #145E52;
  --radius-control: 14px;
  --radius-bubble: 16px;
  --radius-card: 22px;
  --radius-pill: 999px;
  --gradient: linear-gradient(115deg, #1F9E8C 0%, #15212F 100%);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.55; }

/* One focus ring for each control (DS token "focus"). */
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* A heading gets the focus from the script only, so that a screen reader reads the new view. It is not a control. */
h1:focus { outline: none; }

.login-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 0 16px; }

/* The logo link is 44 px high: 28 px image and 8 px padding above and below. */
.login-top { padding-top: 49px; }
.login-logo { display: inline-flex; padding: 8px; border-radius: 8px; }
.login-logo img { display: block; width: auto; height: 28px; }

.login-main { width: 100%; max-width: 440px; margin-top: 27px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 36px 32px; }

/* DS heading-lg. */
.login-card h1 { margin: 0; font-size: 26px; line-height: 1.25; font-weight: 700; letter-spacing: -0.5px; }
.login-sub { margin: 6px 0 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.login-small { margin: 12px 0 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-muted); }

.login-card form { margin-top: 28px; }
.login-field + .login-field { margin-top: 20px; }
.login-field label { display: block; font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--ink); }
.login-field > label { margin-bottom: 8px; }
.login-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }

/* The text is 16 px, not the 14 px of the DS: a smaller size makes iOS Safari zoom in when the field gets the focus. */
.login-field input { display: block; width: 100%; min-height: 48px; padding: 11px 16px; background: var(--surface-subtle); border: 1.5px solid transparent; border-radius: var(--radius-control); font-family: inherit; font-size: 16px; line-height: 1.4; color: var(--ink); transition: border-color .15s, background-color .15s; }
.login-field input::placeholder { color: var(--ink-placeholder); opacity: 1; }
.login-field input:hover { border-color: var(--line-strong); }
.login-field input:focus { border-color: var(--brand); background: var(--surface); }

/* The button "Tonen" / "Verbergen" is in the password field. */
.login-password { position: relative; }
.login-password input { padding-right: 104px; }
.login-password .login-link { position: absolute; top: 2px; bottom: 2px; right: 6px; min-width: 44px; padding: 0 12px; }

/* A link button (DS TextLink). The negative margin keeps the row height; the touch target is 44 px. */
.login-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0; border: none; border-radius: 8px; background: none; font-family: inherit; font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
.login-link:hover { text-decoration-thickness: 2px; }
.login-label-row .login-link { margin: -13px 0; text-align: right; }
.login-link-center { display: flex; margin: 10px auto -12px auto; padding: 0 8px; font-size: 15px; }

/* The primary button (DS Button "primary", block). */
.login-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin-top: 24px; padding: 13px 26px; border: none; border-radius: var(--radius-pill); background: var(--gradient); color: #FFFFFF; font-family: inherit; font-size: 15px; line-height: 1.2; font-weight: 600; cursor: pointer; transition: filter .15s; }
.login-btn:hover { filter: brightness(1.08); }
#sent-view .login-btn { margin-top: 28px; }

/* The error message of state 2 (DS Alert "danger"). Empty until the first attempt. */
.login-alert { display: flex; align-items: flex-start; gap: 12px; margin-top: 24px; padding: 16px 18px; border-radius: var(--radius-bubble); background: var(--danger-soft); color: var(--on-danger-soft); font-size: 14px; line-height: 1.5; }
.login-alert:empty { display: none; }
.login-alert svg { flex-shrink: 0; margin-top: 1px; }
.login-alert + form { margin-top: 24px; }

/* The icon tile of state 4 (DS IconTile "brand"). */
.login-tile { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 24px; border-radius: var(--radius-control); background: var(--brand-soft); color: var(--brand-text); }

.login-below { margin-top: 24px; text-align: center; font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.login-below p { margin: 0; }
.login-below p + p { margin-top: 6px; }
/* An inline link with a touch target of 44 px: the padding and the negative margin keep the line height. */
.login-below a, .login-bottom a { display: inline-block; padding: 13px 0; margin: -13px 0; border-radius: 4px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.login-below a:hover, .login-bottom a:hover { text-decoration-thickness: 2px; }
.login-narrow { display: none; }

.login-bottom { margin-top: auto; padding: 48px 0 28px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; font-size: 14px; line-height: 1.5; color: var(--ink-muted); }

@media (max-width: 720px) {
  /* The logo is 24 px: 10 px padding keeps the link 44 px high. */
  .login-top { padding-top: 33px; }
  .login-logo { padding: 10px; }
  .login-logo img { height: 24px; }
  .login-main { margin-top: 15px; }
}
@media (max-width: 480px) {
  .login-wide { display: none; }
  .login-below { font-size: 13px; }
  .login-narrow { display: inline; }
}
@media (max-width: 340px) {
  .login-card { padding: 28px 20px; }
  .login-label-row { flex-wrap: wrap; gap: 0 12px; }
  .login-label-row .login-link { margin: -6px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .login-field input, .login-btn { transition: none; }
}
