/* ─────────────────────────────────────────────────────────
   Vail Stream Portal — Frontdoor (login/OTP/quote) stylesheet
   Design tokens 1:1 with vailstream.com marketing site.
───────────────────────────────────────────────────────── */

:root {
  /* Brand colors (repointed to the customer-portal redesign palette) */
  --deep-blue:      #12263c;
  --mid-teal:       #1c8fa8;
  --bright-cyan:    #2fc1de;
  --bright-cyan-hover: #4ccde6;

  /* Neutrals */
  --text-primary:   #0a0a0a;
  --text-secondary: #404040;
  --text-tertiary:  #6b7280;
  --border:         #e5e7eb;
  --bg:             #ffffff;
  --bg-light:       #f8fafc;
  --dark:           #0d1b2b;

  /* Typography */
  --font: Helvetica, Arial, sans-serif;
  --leading: 1.5;

  /* Misc */
  --radius:  7px;
  --gutter:  24px;
  --nav-h:   64px;
}

* { box-sizing: border-box; }

body.frontdoor {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: var(--leading);
  color: rgb(255 255 255 / 85%);
  background: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── Top nav ──────────────────────────────────────────── */

.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}
.brand .logo { display: block; }

.cta-quote {
  color: rgb(255 255 255 / 70%);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.cta-quote:hover {
  color: var(--bright-cyan);
}

/* ── Hero (gradient backdrop + wave streams) ──────────── */

.hero {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0c4a6e 100%);
  pointer-events: none;
  overflow: hidden;
}
.hero-streams {
  width: 100%;
  height: 100%;
  opacity: 0.12;
}
@media (prefers-reduced-motion: reduce) {
  .hero-streams animateTransform { display: none; }
}

/* ── Hero foreground (card + tagline) ─────────────────── */

.hero-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 32px) var(--gutter) var(--gutter);
  gap: 24px;
}

.panel {
  background: rgb(15 23 42 / 60%);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--bright-cyan);
  border-radius: var(--radius);
  padding: 24px;
  width: min(380px, 100%);
}

.card {
  background: var(--bg);
  color: var(--text-primary);
  border-radius: var(--radius);
  padding: 28px;
}
/* The eyebrow-style heading on the quote / verify / recovery cards.

   COLOUR CHANGED FROM --bright-cyan TO --deep-blue. Cyan on white measures
   2.43:1, which fails WCAG AA (4.5:1) for text this small — and 11px uppercase
   letter-spaced type is the least legible thing on the page to begin with.
   Deep blue is the same brand family and clears AA at about 8.7:1. Cyan
   remains what it is elsewhere in this system: a FILL that takes dark text,
   not a text colour on white. Revert this one declaration if the look is
   wanted back, but the login panel below deliberately does not use it. */
.card h1 {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--deep-blue);
  margin: 0 0 20px;
}
.card form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card input[type=text],
.card input[type=password],
.card input[type=email],
.card input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 16px;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* FOCUS IS AN OUTLINE, NOT A TINT.

   This used to be `outline: none` plus a cyan border and a 12%-alpha cyan
   glow. Cyan on white measures 2.43:1 and the glow about 1.05:1, so the only
   indication that a field had keyboard focus failed SC 1.4.11 (3:1) — on the
   two inputs that sit between the two vendor buttons whose own rule below
   states exactly that limit. The cyan border is kept as decoration; the deep
   blue outline is the part that has to be seen. */
.card input:focus {
  outline: 2px solid var(--deep-blue);
  outline-offset: 1px;
  border-color: var(--bright-cyan);
  box-shadow: 0 0 0 3px rgb(6 182 212 / 12%);
}
.card button[type=submit] {
  background: var(--bright-cyan);
  color: var(--text-primary);
  border: 0;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

/* `:not(.sso-btn)` IS LOAD-BEARING, NOT TIDINESS.

   The vendor buttons are <button type="submit">, so this rule matched them.
   `.card button.sso-btn` is (0,2,1) and this was (0,3,1), so hovering either
   provider button repainted it #05a3bf — a brand violation for both vendors
   (each publishes #FFFFFF as the fill) and an AA failure for Microsoft, whose
   #5E5E5E label drops to 2.16:1 on cyan. Excluding them here removes the trap
   at source; `.card button.sso-btn:hover` below also restates the white fill,
   so neither half alone is what holds. */
.card button[type=submit]:not(.sso-btn):hover {
  background: var(--bright-cyan-hover);
}
.card .muted {
  color: var(--text-tertiary);
  font-size: 13px;
  margin-top: 16px;
}
.card .error {
  color: #b91c1c;
  font-size: 13px;
}

/* Verify page: secondary "resend" action, clearly separated from primary Verify button */
.card .resend-row {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  text-align: center;
}
.card .resend-row .muted {
  margin-top: 0;
  color: var(--text-tertiary);
}
.card .resend-form {
  display: inline;
  margin: 0;
}
.card .link-button {
  background: none;
  border: 0;
  padding: 4px 8px;
  color: var(--mid-teal);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}
.card .link-button:hover {
  color: var(--deep-blue);
}

/* Tagline beneath the card */
.positioning {
  color: rgb(255 255 255 / 65%);
  text-align: center;
  max-width: 540px;
  font-size: 17px;
  line-height: 1.6;
}

/* ── Footer ───────────────────────────────────────────── */

.footer {
  position: relative;
  z-index: 1;
  padding: 16px var(--gutter);
  font-size: 13px;
  color: rgb(255 255 255 / 45%);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.footer a {
  color: rgb(255 255 255 / 45%);
  text-decoration: none;
  transition: color 0.2s;
}
.footer a:hover {
  color: var(--bright-cyan);
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 768px) {
  .hero-main {
    flex-direction: column-reverse;
    padding-top: calc(var(--nav-h) + 16px);
  }
  .positioning {
    margin-top: 8px;
    font-size: 15px;
  }
}

/* ── Quote form (wide, sectioned) ─────────────────────── */

.panel--wide { width: min(600px, 100%); }

.panel--wide .card h1 { text-align: center; }  /* center "REQUEST A QUOTE" on the quote page only */

.quote-intro {
  color: var(--text-secondary);
  font-size: 14px;
  margin: -8px 0 20px;
  text-align: center;
}

/* Scope input styling to real text-like inputs so checkboxes/radios are unaffected. */
.card .quote-form input[type="text"],
.card .quote-form input[type="email"],
.card .quote-form input[type="tel"],
.card .quote-form select,
.card .quote-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 16px;
  color: var(--text-primary);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card .quote-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.card .quote-form input:focus,
.card .quote-form select:focus,
.card .quote-form textarea:focus {
  outline: none;
  border-color: var(--bright-cyan);
  box-shadow: 0 0 0 3px rgb(6 182 212 / 12%);
}

.quote-form .fieldgroup { margin-bottom: 22px; }

.quote-form .fieldgroup-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mid-teal);
  margin: 0 0 12px;
}

.quote-form .opt {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-tertiary);
  font-size: 11px;
}

.quote-form .field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.quote-form .field-grid--address { grid-template-columns: 2fr 1.4fr 1fr; }

.quote-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.quote-form .field > label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.quote-form .errorlist {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  color: #b91c1c;
  font-size: 12px;
}

/* Locked country display */
.quote-form .country-lock {
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 15px;
  background: var(--bg-light);
}

/* Service chips (styled checkboxes) */
.quote-form .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-form .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.quote-form .chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.quote-form .chip:has(input:checked) {
  border-color: var(--bright-cyan);
  background: rgb(6 182 212 / 10%);
  color: var(--text-primary);
}

.quote-form .chip:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgb(6 182 212 / 20%);
}

/* Consent row */
.quote-form .consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  margin: 4px 0;
  cursor: pointer;
}

.quote-form .consent input {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  margin-top: 3px;
}

/* City autocomplete dropdown */
.quote-form .ac-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  margin: 2px 0 0;
  padding: 4px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(15 23 42 / 12%);
  max-height: 240px;
  overflow-y: auto;
}

.quote-form .ac-item {
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}

.quote-form .ac-item.is-active,
.quote-form .ac-item:hover { background: var(--bg-light); }

.quote-form button[type="submit"] {
  width: 100%;
  margin-top: 8px;
}

/* data-size="flexible" makes Turnstile fill this block's width, so it lines up
   with the inputs/Send button instead of being a rigid 300px box that overflows
   a narrow card. Block (not flex) so the widget spans the full width. */
.cf-turnstile {
  margin: 12px 0;
}

@media (width <= 560px) {
  .quote-form .field-grid,
  .quote-form .field-grid--address { grid-template-columns: 1fr; }

  /* Trim padding on narrow screens so the card interior stays wide enough for
     Turnstile's 300px minimum (keeps the flexible widget from overflowing). */
  .hero-main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .panel--wide { padding: 12px; }

  .panel--wide .card { padding: 18px; }
}

/* ── #427: the sign-in panel ───────────────────────────────────────── */

.flash {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.flash li {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.45;
}

.flash li + li { margin-top: 8px; }

.flash-error {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

.flash-warning {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.flash-success,
.flash-info {
  border-color: #7dd3fc;
  background: #f0f9ff;
  color: #075985;
}

/* ── the sign-in panel ─────────────────────────────────────────────────
   Scoped to .panel--auth / the .auth-* classes so the quote, verify and
   recovery cards — which share .card — are untouched. */

.panel--auth { width: min(448px, 100%); }

.panel--auth .card { padding: 40px 40px; }

/* Header centred on the widened panel — a branded, welcoming top; the form
   fields below stay left-aligned with their labels. */
.auth-eyebrow,
.card .auth-title,
.auth-sub { text-align: center; }

.auth-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;

  /* --deep-blue on white ≈ 8.7:1. Cyan would be 2.43:1 and is a FILL in this
     system, never a text colour on white. */
  color: var(--deep-blue);
}

.card .auth-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-transform: none;
  color: var(--dark);
}

.auth-sub {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.5;

  /* #6b7280 on white ≈ 4.8:1 — clears AA for body text. */
  color: var(--text-tertiary);
}

.card .auth-form { gap: 14px; }

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.card .auth-field input {
  width: 100%;
  padding: 11px 12px;
}

.card button.auth-submit {
  margin-top: 4px;
  padding: 12px 28px;

  /* Cyan fill, DARK text — the house rule. #0a0a0a on #06b6d4 = 8.15:1. */
  background: var(--bright-cyan);
  color: var(--text-primary);
}

.card button.auth-submit:focus-visible {
  outline: 2px solid var(--deep-blue);
  outline-offset: 2px;
}

.auth-recovery {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-tertiary);
}

.auth-recovery a { color: var(--deep-blue); }

/* ── vendor sign-in buttons ────────────────────────────────────────────
   EVERY NUMBER BELOW IS A PUBLISHED VENDOR REDLINE, NOT A DESIGN CHOICE.
   Both companies require their button's wording, mark, colours, type and
   padding; a button that drifts from them is a policy violation, and for
   Google it is checked during app verification. Do not "tidy" these to match
   the brand tokens — the marks are the one place on this site that is
   deliberately off-brand.

     Google  — developers.google.com/identity/branding-guidelines (light theme)
               height 40, radius 4, fill #FFFFFF, 1px inside stroke #747775,
               text #1F1F1F Google Sans Medium 14/20, padding 12 / gap 10 / 12,
               logo 20x20 standard-colour G on white.
     Microsoft — learn.microsoft.com/entra/identity-platform/
               howto-add-branding-in-apps (light theme)
               height 41, square, fill #FFFFFF, 1px border #8C8C8C,
               text #5E5E5E Segoe UI 15px weight 600, padding 12 / gap 12 / 12,
               logo 21x21 unaltered.

   Contrast: #1F1F1F on #FFFFFF ≈ 17.4:1, #5E5E5E on #FFFFFF ≈ 6.5:1 — both
   clear AA, which is why neither needed adjusting.

   Google also requires its button to be at least as prominent as any other
   third-party sign-in option: same width, same visual weight, and it is
   rendered first (sso.PROVIDER_KEYS order).

   Where the two marks came from, and the "do not edit / recolour / redraw"
   rule that governs them: docs/vendor-sign-in-marks.md. That file used to sit
   in the static tree beside the images, which meant collectstatic published
   our asset-provenance notes at /static/frontdoor/img/README.md. */

.sso-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sso-form { margin: 0; }

/* Longhand `.card button.sso-btn` because `.card button[type=submit]` above
   has the same specificity and would otherwise paint these cyan. Every
   property that rule sets is restated here so nothing leaks in. */
.card button.sso-btn {
  display: flex;
  align-items: center;

  /* Content is centred as a group, matching Google's own full-width button;
     the paddings below are therefore MINIMUMS, which is what a redline is. */
  justify-content: center;
  width: 100%;
  background: #fff;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.sso-btn-mark {
  display: block;
  flex: none;
}

.card button.sso-btn--google {
  height: 40px;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid #747775;
  border-radius: 4px;
  color: #1f1f1f;

  /* Google Sans Medium is the specified face. It is not a system font and this
     is an unauthenticated page, so pulling a webfont from a third party here
     would add a request that fingerprints every visitor before they sign in —
     a worse trade than a near-identical fallback. Google Sans is used when the
     visitor already has it; otherwise the closest grotesque available. */
  font-family: "Google Sans", "Google Sans Text", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.card button.sso-btn--microsoft {
  height: 40px;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid #8c8c8c;

  /* Rounded, 40px, 14px label — aligned to the Google button's chrome so the two
     read as a matched pair. Microsoft's lockup is usually square at 15px, but
     with Microsoft inert here we move the shared chrome onto Google's exact
     verified redline rather than the reverse; the mark, wording, font and label
     colour stay Microsoft's. */
  border-radius: 4px;
  color: #5e5e5e;
  font-family: "Segoe UI", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

/* Hover raises the button instead of tinting it: both vendors specify the
   default fill and border exactly, so an elevation change is the one affordance
   that leaves their colours alone.

   `background: #fff` is RESTATED here rather than merely inherited. The
   vendors' fill is the one property the generic `.card button[type=submit]`
   family kept reclaiming, and a rule that only adds a shadow leaves the winning
   background declaration somewhere else in the file where nobody looks. */
.card button.sso-btn:hover {
  background: #fff;
  box-shadow: 0 1px 3px rgb(60 64 67 / 30%), 0 4px 8px 3px rgb(60 64 67 / 15%);
}


.card button.sso-btn:focus-visible {
  /* --deep-blue, not cyan: a focus ring must clear 3:1 against what surrounds
     it, and cyan on white is 2.43:1. */
  outline: 2px solid var(--deep-blue);
  outline-offset: 2px;
}

/* Microsoft's required account-type label, shown only under the Microsoft
   button (see login.html). Not an explainer — the how-to-link guidance lives in
   the authenticated Sign-in methods page. */
.sso-btn-note {
  margin: 8px 2px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-tertiary);
}

/* Separator between the provider buttons and the password form.

   role="separator" with the word itself aria-hidden: screen readers announce a
   separator (or nothing), never the string "or" as though it were content or a
   heading. The rules are drawn on the pseudo-elements so the word sits in a
   gap. */
.sso-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 18px;
  color: var(--text-tertiary);
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.sso-divider::before,
.sso-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}

.muted.small { font-size: 12.5px; }

@media (width <= 560px) {
  .panel--auth { padding: 14px; }

  .panel--auth .card { padding: 22px 18px; }
}
