/*
 * AQUROV login page styles.
 *
 * Used by page-login-page.php only (page slug "login-page"). Its <main> carries
 * .sp-page .aql-page: assets/css/static-page.css supplies the palette, container,
 * hero, section, split layout, side panel, buttons and lists, and every rule
 * below is scoped to .aql-page, so nothing here reaches another page. The form
 * itself is WordPress' own wp_login_form() markup, so the rules target core's
 * login-* classes and the submit input's .button class; no vendor file is
 * involved and no global element selector is written. The help line under the
 * form is .aql-help / .aql-help-link, so it depends on no shared class either.
 *
 * Same visual language as the rest of the site: Inter stack, 6-8px radii, 44px
 * controls, 1220px container, 24px side padding (16px at 680px and below).
 */

.aql-page {
  --aql-blue: #0F5FB8;
  --aql-blue-dark: #0A4D95;
  --aql-surface: #EEF3F7;
  --aql-border: #DBE3EA;
  --aql-ink: #17212B;
  --aql-body: #40505E;
  --aql-muted: #687684;
  --aql-red: #B42318;
  --aql-red-bg: #FDF4F3;
  --aql-radius: 8px;

  background: var(--aql-surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.aql-page,
.aql-page *,
.aql-page *::before,
.aql-page *::after { box-sizing: border-box; }

/* Hero ------------------------------------------------------------------- */

/* This hero ends with the lead — unlike the other .sp-page heroes there is no
   button row under it — so the lead's own bottom margin would simply add to the
   hero's bottom padding. */
.aql-page .sp-hero .sp-hero-lead { margin-bottom: 0; }

/* The login card --------------------------------------------------------- */

.aql-page .aql-card {
  min-width: 0;
  max-width: 560px;
  padding: 30px 30px 32px;
  background: #fff;
  border: 1px solid var(--aql-border);
  border-radius: var(--aql-radius);
  border-top: 3px solid var(--aql-blue);
  box-shadow: 0 18px 40px rgba(9, 22, 33, 0.07);
}

.aql-page .aql-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--aql-ink);
}

.aql-page .aql-card-note {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--aql-muted);
}

/* wp_login_form(): fields, remember row, submit -------------------------- */

.aql-page .aql-card form {
  margin: 0;
  max-width: 100%;
}

/* Core wraps each field in p.login-username / p.login-password /
   p.login-remember / p.login-submit; the :last-child rule keeps the submit row
   flush with the bottom of the form if the remember checkbox is ever turned off. */
.aql-page .aql-card form > p,
.aql-page .aql-card form > div { margin: 0 0 16px; }

.aql-page .aql-card form > *:last-child { margin-bottom: 0; }

.aql-page .aql-card label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--aql-ink);
}

.aql-page .aql-card input[type="text"],
.aql-page .aql-card input[type="email"],
.aql-page .aql-card input[type="password"] {
  display: block;
  width: 100%;
  max-width: 100%;
  /* Core renders these inputs with size="20"; min-width:0 keeps that intrinsic
     width from pushing the field past the card at 360px. */
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--aql-border);
  border-radius: 6px;
  background: #fff;
  color: var(--aql-ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
}

.aql-page .aql-card input[type="text"]:focus,
.aql-page .aql-card input[type="email"]:focus,
.aql-page .aql-card input[type="password"]:focus {
  border-color: var(--aql-blue);
  outline: 3px solid rgba(15, 95, 184, 0.35);
  outline-offset: 1px;
}

/* The checkbox is a small target on a white card, so its focus ring is drawn
   explicitly rather than left to the browser's default. */
.aql-page .aql-card input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(15, 95, 184, 0.35);
  outline-offset: 2px;
}

/* Core prints the checkbox inside its own label, so that one label is a row. */
.aql-page .aql-card p.login-remember { margin-bottom: 18px; }

.aql-page .aql-card p.login-remember label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--aql-body);
  cursor: pointer;
}

.aql-page .aql-card input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  accent-color: var(--aql-blue);
}

.aql-page .aql-card p.login-submit {
  margin-top: 4px;
  margin-bottom: 0;
}

.aql-page .aql-card input[type="submit"],
.aql-page .aql-card input.button,
.aql-page .aql-card button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--aql-blue) !important;
  color: #fff !important;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.aql-page .aql-card input[type="submit"]:hover,
.aql-page .aql-card input.button:hover,
.aql-page .aql-card button.button:hover { background: var(--aql-blue-dark) !important; }

/* The submit is a solid blue button on a white card, so a blue ring around it
   would be nearly invisible: the ring is drawn in ink, just outside the button. */
.aql-page .aql-card input[type="submit"]:focus-visible,
.aql-page .aql-card input.button:focus-visible,
.aql-page .aql-card button.button:focus-visible {
  outline: 2px solid var(--aql-ink);
  outline-offset: 2px;
}

.aql-page .aql-card input[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Failed sign-in notice (?login=failed) ---------------------------------- */

.aql-page .aql-alert {
  margin: 0 0 22px;
  padding: 13px 16px;
  border: 1px solid var(--aql-border);
  border-left: 4px solid var(--aql-red);
  border-radius: 6px;
  background: var(--aql-red-bg);
  color: var(--aql-ink);
  font-size: 14px;
  line-height: 1.65;
}

.aql-page .aql-alert a {
  color: var(--aql-blue);
  font-weight: 700;
}

/* Links under the form --------------------------------------------------- */

.aql-page .aql-form-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--aql-border);
}

.aql-page .aql-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  color: var(--aql-blue);
  text-decoration: none;
}

.aql-page .aql-link:hover { text-decoration: underline; }

.aql-page .aql-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--aql-blue);
  outline-offset: 3px;
  text-decoration: underline;
}

/* Help line under the links (.aql-help) ---------------------------------- */

/* A sentence rather than a control: the link inside it stays inline and keeps
   the brand colour, so the card ends on a plain-language way out for someone
   who cannot sign in at all. */
.aql-page .aql-card .aql-help {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--aql-muted);
}

.aql-page .aql-card .aql-help-link {
  color: var(--aql-blue);
  font-weight: 700;
  text-decoration: none;
}

.aql-page .aql-card .aql-help-link:hover { text-decoration: underline; }

.aql-page .aql-card .aql-help-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--aql-blue);
  outline-offset: 3px;
  text-decoration: underline;
}

/* Side panel ------------------------------------------------------------- */

.aql-page .sp-side .sp-eyebrow { margin-bottom: 8px; }

.aql-page .sp-side .sp-list li { font-size: 13.5px; }

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1000px) {
  /* .sp-split stacks into a single column from here down, so the card keeps its
     readable 560px width and is centred in the column rather than stretched into
     a ~950px-wide login form. */
  .aql-page .aql-card {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 680px) {
  .aql-page .aql-card { padding: 22px 18px 24px; }
  .aql-page .aql-card h2 { font-size: 20px; }
  .aql-page .sp-side { padding: 20px 18px 22px; }
}

@media (max-width: 480px) {
  .aql-page .aql-form-links {
    flex-direction: column;
    gap: 0;
  }
  .aql-page .aql-link { width: 100%; }
}
