/**
 * @file
 * Authentication pages: login, register, password reset, phone verification.
 *
 * These are Drupal pages that do not exist in the purchased template, so they
 * are styled here in the template's visual language. Colours map to the
 * template's own custom properties (declared in custom.css); the remaining
 * tokens below are auth-page-specific.
 */

:root {
  /* Colour bridge to the template palette (defined in custom.css :root). */
  --color-primary: var(--accent-color);
  --color-primary-hover: var(--accent-color);
  --color-navy: var(--primary-color);
  --color-text-primary: var(--primary-color);
  --color-text-secondary: var(--text-color);
  --color-surface: var(--white-color);
  --color-surface-muted: var(--secondary-color);
  --color-border: var(--divider-color);

  /* Auth-page layout tokens. */
  --radius-md: 8px;
  --radius-lg: 20px;
  --radius-pill: 100px;
  --section-spacing-compact: 50px;
  --transition-fast: 0.3s ease-in-out;
  --shadow-card: 0 4px 30px 0 color-mix(in srgb, var(--primary-color) 7%, transparent);
  --shadow-focus: 0 0 0 3px color-mix(in srgb, var(--accent-color) 35%, transparent);
}

.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--color-surface-muted);
}

/* Reduced header: brand only, no navigation. */
.auth-header {
  position: static;
  padding-block: 24px;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.auth-header .container {
  display: flex;
  justify-content: center;
}

/* Vertically centred form area that grows to fill the viewport. */
.auth-section {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  padding-block: var(--section-spacing-compact);
}

.auth-card {
  padding: 40px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.auth-card-header {
  margin-bottom: 28px;
}

.auth-card-header h1 {
  margin-bottom: 8px;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text-primary);
}

.auth-card-header p {
  margin-bottom: 0;
  color: var(--color-text-secondary);
}

.auth-messages {
  margin-bottom: 20px;
}

/* Form controls inside the card. The markup emits Drupal form elements with
   .form-control from the input/select/textarea overrides; this only handles
   spacing and the submit button so marketing-page forms stay unaffected. */
.auth-form .form-item,
.auth-form .js-form-item {
  margin-bottom: 18px;
}

.auth-form label {
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.auth-form .btn-default,
.auth-form .form-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-form-footer {
  margin-top: 14px;
}

.auth-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.auth-link:hover,
.auth-link:focus {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* "Or continue with" divider. */
.auth-divider {
  display: flex;
  align-items: center;
  margin-block: 24px;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background-color: var(--color-border);
}

.auth-divider span {
  padding-inline: 14px;
}

/* Third-party sign-in button. */
.btn-social {
  gap: 10px;
  padding: 12px 20px;
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  font-weight: 600;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-social:hover,
.btn-social:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
  color: var(--color-text-primary);
}

.btn-social-icon {
  flex: 0 0 auto;
}

.auth-alt {
  margin-top: 24px;
  color: var(--color-text-secondary);
}

.auth-alt p {
  margin-bottom: 0;
}

.auth-back {
  margin-top: 24px;
}

.auth-back a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.auth-back a:hover,
.auth-back a:focus {
  color: var(--color-primary);
}

/* Reduced footer. */
.auth-footer {
  margin-top: 0;
  padding-block: 24px;
  background-color: transparent;
  color: var(--color-text-secondary);
}

.auth-footer .footer-copyright-text p {
  margin-bottom: 0;
  font-size: 0.875rem;
  /* The marketing footer sits on the dark navy panel and uses inverse (white)
     copyright text. The auth footer sits on a light surface, so restore a
     readable colour here. */
  color: var(--color-text-secondary);
}

/* Phone verification specifics. */

/* Circular icon badge above the card heading. */
.auth-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary);
}

/* "We sent a code to <number>" notice. */
.auth-notice {
  margin-bottom: 24px;
  color: var(--color-text-secondary);
}

.auth-notice p {
  margin-bottom: 0;
}

.auth-notice strong {
  display: inline-block;
  margin-top: 8px;
  color: var(--color-text-primary);
}

/* Troubleshooting hint list below the code form. */
.auth-help {
  margin-top: 24px;
  padding: 18px 20px;
  background-color: var(--color-surface-muted);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.auth-help p {
  margin-bottom: 8px;
  color: var(--color-text-primary);
}

.auth-help ul {
  margin-bottom: 0;
  padding-left: 1.1em;
}

.auth-help li {
  margin-bottom: 6px;
}

.auth-help li:last-child {
  margin-bottom: 0;
}

@media (max-width: 575px) {
  .auth-card {
    padding: 28px 22px;
  }
}

/* Consent-free location placeholder (contact page), used in place of a remote
   map embed. Colours come from the template palette (defined in custom.css). */
.location-map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  width: 100%;
  min-height: 450px;
  padding: 40px 24px;
  border-radius: 40px;
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.location-map-placeholder__icon {
  font-size: 44px;
  line-height: 1;
  color: var(--accent-color);
}

.location-map-placeholder__name {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-color);
}

.location-map-placeholder__address {
  font-size: 16px;
}

.location-map-placeholder__note {
  font-size: 14px;
  max-width: 520px;
  opacity: 0.85;
}

/* Main navigation — Drupal block integration.
   Drupal wraps the menu in block markup (<div><nav>…<ul id="menu">), so the
   template's `.nav-menu-wrapper > ul` centring rule (which needs a direct child)
   never matches. The wrapper's `text-align: center` still inherits down, so
   making the menu list inline-flex re-centres it exactly as the template does. */
.main-menu .nav-menu-wrapper #menu {
  display: inline-flex;
  align-items: center;
}
