/* ============================================================
   WayWyser auth — drop-in stylesheet (shared by all Identity
   account pages via _AuthLayout.cshtml).

   Font links are added in the layout <head>:
   Sora (headings/buttons) + Manrope (body).
   ============================================================ */

:root {
  --ww-green: #14684e;
  --ww-green-dark: #0f523d;
  --ww-ink: #16302a;
  --ww-muted: #5f7269;
  --ww-border: #d6e0da;
  --ww-surface: #f7faf8;
  --ww-danger: #c0392b;
}

.waywyser-login-form {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: var(--ww-surface);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ww-ink);
  -webkit-font-smoothing: antialiased;
}

/* Constrained column = no more awkward wrapping */
.form-inner {
  width: 100%;
  max-width: 400px;
}

/* Logo lockup (icon + wordmark): taller and centred */
.brand-logo {
  display: block;
  height: 80px;
  width: auto;
  margin: 0 auto 2rem;
}

.form-inner h2 {
  margin: 0 0 0.5rem;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ww-ink);
  text-wrap: balance;
}

.subheading {
  margin: 0 0 2rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ww-muted);
  text-wrap: pretty;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ww-ink);
}

.form-control {
  box-sizing: border-box;
  width: 100%;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ww-ink);
  background: #fff;
  border: 1px solid var(--ww-border);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control::placeholder {
  color: #9db0a7;
}

.form-control:focus {
  outline: none;
  border-color: var(--ww-green);
  box-shadow: 0 0 0 3px rgba(20, 104, 78, 0.14);
}

.password-wrapper {
  position: relative;
}

.password-wrapper .form-control {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  border: none;
  border-radius: 8px;
  background: none;
  color: #7a8d84;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.password-toggle:hover {
  color: var(--ww-green);
  background: #edf4f0;
}

.form-links-left {
  margin: -0.4rem 0 1.1rem;
}

.form-links-left a,
.signup-left a {
  color: var(--ww-green);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.form-links-left a:hover,
.signup-left a:hover {
  text-decoration: underline;
}

.remember-me label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ww-ink);
  cursor: pointer;
}

.remember-me input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--ww-green);
}

/* Hint text under "Trust this device" */
.field-hint,
.remember-me > div {
  margin-top: 0.3rem;
  padding-left: 1.5rem;
  font-size: 0.8rem !important;
  color: var(--ww-muted) !important;
}

.btn-login {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.8rem 1rem;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--ww-green);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-login:hover {
  background: var(--ww-green-dark);
}

.btn-login:active {
  transform: translateY(1px);
}

.signup-left {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  color: var(--ww-muted);
}

.text-danger {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--ww-danger);
}

/* ============================================================
   Split-panel layout + photo side (WayWyser auth pages).
   The block above styles the form column; this styles the
   two-column frame and the left-hand image panel.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }

.waywyser-login-container {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh; /* avoids mobile browser-chrome jump */
}

/* The form column already gets its look above; here it just shares the split. */
.waywyser-login-form { flex: 1; }

.waywyser-login-image {
  flex: 1;
  background: url('/images/LOGON_IMAGE.jpg') center / cover no-repeat;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}
/* Scrim so the white caption stays legible over the photo. */
.waywyser-login-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 45%);
  pointer-events: none;
}
.location-caption {
  position: relative;
  z-index: 1;
  margin: 1rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  font-family: "Sora", "Manrope", system-ui, sans-serif;
}
.location-caption h2 { margin: 0; font-size: 1.5rem; font-weight: 700; }
.location-caption p { margin: 0.15rem 0 0; font-size: 0.9rem; opacity: 0.9; }

/* Register terms + confirmation-page extras not covered by the base styles. */
.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--ww-ink);
}
.form-checkbox input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--ww-green); }
.form-checkbox a { color: var(--ww-green); text-decoration: underline; }

.alert-danger {
  background: #fdecea;
  color: var(--ww-danger);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  border: 1px solid #f3c9c4;
}
.alert-danger strong { display: block; margin-bottom: 0.25rem; }

/* Stack on tablets/phones: photo banner on top, form below. */
@media (max-width: 768px) {
  .waywyser-login-container { flex-direction: column; }
  .waywyser-login-image { flex: none; height: 170px; padding: 1rem; }
  .waywyser-login-form { min-height: auto; padding: 1.75rem 1.25rem 2.25rem; }
  .form-inner { margin: 0 auto; }
}
/* Very short landscape phones: hide the banner so the form fits. */
@media (max-height: 480px) and (max-width: 768px) {
  .waywyser-login-image { display: none; }
}

/* AUDIT LOGO STRIP – remove after audit.
   Funder-acknowledgement band pinned to the bottom of the form panel,
   spanning full width (photo edge to the right of the screen). */
.waywyser-login-form { position: relative; }
.audit-logo-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--ww-surface);
  text-align: center;
}
/* On phones the form panel shrinks to its content, so an absolute strip would
   overlap the last form line. Stack the panel as a column and let the strip
   flow underneath the form (full width) instead of beside it. */
@media (max-width: 768px) {
  .waywyser-login-form {
    flex-direction: column;
  }
  .audit-logo-strip {
    position: static;
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem 0 0;
  }
}
.audit-logo-strip img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: inline-block;
}
/* END AUDIT LOGO STRIP */
