/* Authelia portal in the gateway's cream-and-orange look (light or dark follows the device), matching
   the gateway pages. Injected by nginx on both front doors (VPS + mba admin-proxy); skipped for
   /?password so a new user can still do the first password login before they have a passkey. */
:root:root, [data-theme][data-theme] {
  color-scheme: light;
  --gw-panel: #fdfcf9;
  --background: #f4ece2;
  --foreground: #1d1e21;
  --card: #fdfcf9;
  --card-foreground: #1d1e21;
  --popover: #fdfcf9;
  --popover-foreground: #1d1e21;
  --primary: #ec6431;
  --primary-foreground: #ffffff;
  --secondary: #f4efe8;
  --secondary-foreground: #1d1e21;
  --muted: #f4efe8;
  --muted-foreground: #6e6b66;
  --accent: #f4efe8;
  --accent-foreground: #1d1e21;
  --destructive: #b4441b;
  --destructive-foreground: #ffffff;
  --success: #e1efe6;
  --success-foreground: #1d1e21;
  --warning: #fde7dd;
  --warning-foreground: #1d1e21;
  --info: #e9e4dc;
  --info-foreground: #1d1e21;
  --border: #e9e4dc;
  --input: #d9d3ca;
  --ring: #ec6431;
  --custom-icon: #ec6431;
  --custom-loading-bar: #ec6431;
}
@media (prefers-color-scheme: dark) {
  :root:root, [data-theme][data-theme] {
    color-scheme: dark;
    --gw-panel: #1e1f22;
    --background: #121315;
    --foreground: #ecebe8;
    --card: #1e1f22;
    --card-foreground: #ecebe8;
    --popover: #1e1f22;
    --popover-foreground: #ecebe8;
    --secondary: #292a2e;
    --secondary-foreground: #ecebe8;
    --muted: #292a2e;
    --muted-foreground: #94938f;
    --accent: #292a2e;
    --accent-foreground: #ecebe8;
    --destructive: #f59a76;
    --destructive-foreground: #1d1e21;
    --success: #22382c;
    --success-foreground: #ecebe8;
    --warning: #3a2a23;
    --warning-foreground: #ecebe8;
    --info: #303135;
    --info-foreground: #ecebe8;
    --border: #303135;
    --input: #45464b;
  }
}
body { font-family: Helvetica, "Helvetica Neue", Arial, sans-serif; }
::selection { background: #fde7dd; color: #1d1e21; }

/* Sign-in page: a panel with the arch, "Sign in" and only the passkey button */
body:has(#first-factor-stage) header,
#first-factor-stage .flex-col > :not(:has(#form-login)):not(:has(h5)),
#form-login .grid > :not(:has(#passkey-sign-in-button)) {
  display: none !important;
}
#first-factor-stage > div {
  max-width: 400px;
  margin: 0 1rem;
  padding: 1.6rem 1.7rem 1.4rem;
  border-radius: 14px;
  background: var(--gw-panel);
  text-align: left;
}
#first-factor-stage > div::before {
  content: "lambertusdekker.nl";
  display: flex;
  align-items: center;
  min-height: 2.4rem;
  padding-left: 3.15rem;
  margin-bottom: 1.2rem;
  background: url(/_skin/favicon.svg) left center / 2.4rem 2.4rem no-repeat;
  font-weight: 700;
}
#first-factor-stage h5 { font-size: 1.35rem; font-weight: 600; }
#passkey-sign-in-button {
  height: 3.25rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: none;
  border-radius: 10px;
  background: #ec6431;
  color: #ffffff;
}
#passkey-sign-in-button:hover { background: #ec6431; filter: brightness(1.08); }
#passkey-sign-in-button:focus-visible { outline: 2px solid #ec6431; outline-offset: 2px; }

/* Recovery link (injected by nginx): only on the sign-in page */
#gw-help { display: none; }
body:has(#first-factor-stage) #gw-help {
  display: block;
  position: fixed;
  left: 0; right: 0; bottom: 1.75rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted-foreground);
  text-decoration: underline;
}
body:has(#first-factor-stage) #gw-help:hover { color: var(--foreground); }
