/* Web sign-in — the desktop/browser counterpart to the APK's map landing.
 *
 * Values measured off the running bundle's CitizenHealthPortalLogin, the screen
 * a normal browser gets when Capacitor does not report a native platform.
 *
 *   page      #F0FDFA → #FFFFFF → #CFFAFE (to bottom right)
 *   shell     max 1152px, radius 32, white/70 over a blur
 *   panel     #0F766E → #059669 → #0891B2, desktop only
 *   action    #0D9488 → #06B6D4
 *
 * Deliberately light and calm: this is the screen a clinician signs into at the
 * start of a shift, not the one a stranger uses at a roadside.
 */

@font-face {
  font-family: LayGrotesk;
  src: url('/assets/fonts/LayGrotesk-Medium.woff') format('woff');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('/assets/fonts/CabinetGrotesk-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --w-teal:    #0D9488;
  --w-cyan:    #06B6D4;
  --w-ink:     #111827;
  --w-body:    #374151;
  --w-muted:   #6B7280;
  --w-faint:   #9CA3AF;
  --w-line:    #E5E7EB;
  --w-danger:  #DC2626;
}

html, body.web-auth { margin: 0; }
body.web-auth {
  min-height: 100dvh;
  background: linear-gradient(to bottom right, #F0FDFA, #FFFFFF, #CFFAFE);
  color: var(--w-ink);
  font-family: LayGrotesk, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.wa-shell {
  width: 100%; max-width: 1152px;
  display: grid; grid-template-columns: 1fr;
  border-radius: 32px; overflow: hidden;
  /* Solid, not blurred-translucent — see the matching note in assets/auth.css
     on .auth-card: backdrop-filter is a known Android WebView keyboard-resize
     compositing bug trigger. Higher opacity substitutes for the blur. */
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
@media (min-width: 1024px) { .wa-shell { grid-template-columns: 1fr 1fr; } }

/* ── Left: the pitch. Hidden below 1024px, exactly as the original — the
      form must not be pushed below a screenful of marketing on a phone. ── */
.wa-panel { display: none; }
@media (min-width: 1024px) {
  .wa-panel {
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px; color: #fff; position: relative; overflow: hidden;
    background: linear-gradient(to bottom right, #0F766E, #059669, #0891B2);
  }
}
.wa-panel-logo { width: 145px; height: auto; display: block; }
.wa-panel h1 {
  font-size: 48px; line-height: 1.1; font-weight: 700; margin: 0 0 16px;
  font-family: 'Cabinet Grotesk', LayGrotesk, sans-serif; color: #fff;
}
.wa-panel p.lead { font-size: 18px; line-height: 1.55; color: rgba(255, 255, 255, 0.8); margin: 0; }
.wa-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.wa-feature { text-align: center; }
.wa-feature-icon {
  width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(to bottom right, #14B8A6, #06B6D4);
}
.wa-feature-icon svg { width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 2; }
.wa-feature p { font-size: 14px; color: rgba(255, 255, 255, 0.8); margin: 0; }

/* ── Right: the form ─────────────────────────────────────────────────── */
.wa-form-wrap { padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 520px) { .wa-form-wrap { padding: 32px 22px; } }

/* Logo rides above the form only when the panel is gone. */
.wa-mobile-logo { display: block; margin: 0 auto 32px; width: 145px; height: auto; }
@media (min-width: 1024px) { .wa-mobile-logo { display: none; } }

.wa-title {
  font-size: 36px; font-weight: 700; margin: 0 0 8px; color: var(--w-ink);
  font-family: 'Cabinet Grotesk', LayGrotesk, sans-serif;
}
.wa-sub { font-size: 16px; color: var(--w-muted); margin: 0 0 32px; }
@media (max-width: 1023px) { .wa-title, .wa-sub { text-align: center; } }

.wa-field { margin-bottom: 20px; }
.wa-field > label {
  display: block; font-size: 14px; font-weight: 500; color: var(--w-body); margin-bottom: 8px;
}
.wa-input {
  width: 100%; box-sizing: border-box; height: 58px; padding: 0 18px;
  border-radius: 16px; border: 1px solid var(--w-line);
  background: rgba(255, 255, 255, 0.7); color: var(--w-ink);
  font-size: 16px; font-family: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.wa-input:focus { border-color: var(--w-teal); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15); }
.wa-input::placeholder { color: var(--w-faint); }

.wa-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.wa-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--w-body); }
.wa-check input { width: 16px; height: 16px; accent-color: var(--w-teal); }
.wa-link { font-size: 14px; font-weight: 500; color: var(--w-teal); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0; font-family: inherit; }
.wa-link:hover { text-decoration: underline; }

.wa-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--w-muted);
}
.wa-badge svg { width: 15px; height: 15px; stroke: var(--w-teal); fill: none; stroke-width: 2; }

.wa-btn {
  display: block; width: 100%; box-sizing: border-box; height: 60px;
  border: 0; border-radius: 16px; cursor: pointer;
  background: linear-gradient(to right, #0D9488, #06B6D4);
  color: #fff; font-family: inherit; font-size: 16px; font-weight: 600;
  text-align: center; text-decoration: none; line-height: 60px;
  transition: filter .15s, opacity .15s;
}
.wa-btn:hover { filter: brightness(1.05); }
.wa-btn:disabled { opacity: .5; cursor: not-allowed; }
.wa-btn-ghost {
  background: #fff; color: var(--w-body); border: 1px solid var(--w-line);
  margin-top: 12px;
}

.wa-alert {
  border-radius: 16px; padding: 12px 16px; font-size: 14px; margin-bottom: 20px;
  background: #FEF2F2; border: 1px solid #FECACA; color: var(--w-danger);
}
.wa-or { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--w-faint); font-size: 13px; }
.wa-or::before, .wa-or::after { content: ''; flex: 1; height: 1px; background: var(--w-line); }

.wa-foot { text-align: center; font-size: 14px; color: var(--w-muted); margin: 24px 0 0; }
.wa-foot a { color: var(--w-teal); text-decoration: none; font-weight: 500; }
.wa-brand { text-align: center; font-size: 12px; color: var(--w-faint); margin: 28px 0 0; }

/* Provider row, shared markup with the APK panel — see views/auth/providers.php. */
.social-row { display: flex; justify-content: center; gap: 16px; }
.social-btn {
  width: 52px; height: 52px; border-radius: 16px; background: #fff; border: 1px solid var(--w-line);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.10); cursor: pointer;
  flex-shrink: 0; transition: opacity .2s;
}
.social-btn:hover { opacity: .85; }
.social-facebook { background: #1877F2; border-color: #1877F2; }

/* Logo swap by system color scheme — same technique as assets/auth.css,
   covering this layout's own views (web-login/forgot/forgot-sent/reset). */
@media (prefers-color-scheme: dark) {
  img[src="/assets/img/hp-logo.png"] { content: url(/assets/img/hp-logo-dark.png); }
}
@media (prefers-color-scheme: light) {
  img[src="/assets/img/hp-logo.png"] { content: url(/assets/img/hp-logo-light.png); }
}
