/* TEMPORARY — plain (non-module) stylesheet for the new-style preview route.
 *
 * Purpose: make the new header's `position: sticky` actually stick.
 *
 * app/globals.css sets `html, body { height: 100% }` (line 61) and
 * `body { overflow-x: hidden }` (line 72). Together those turn <body> into a
 * fixed-height scroll container, and a sticky element cannot stick to a
 * scrollport it overflows — so .mo-header scrolls away, taking the hover
 * targets for the mega menus with it.
 *
 * Every rule is gated behind :has(.new-style-preview), so it is inert on every
 * other route even if this stylesheet stays loaded after a client-side
 * navigation. The shared globals.css is not modified.
 *
 * Delete this file, and its import in NewStylePreviewPage.tsx, when the
 * preview is retired.
 */

html:has(.new-style-preview),
body:has(.new-style-preview) {
  height: auto;
}

/* ---------------------------------------------------------------------------
 * PUBLIC FORM SURFACE — one field treatment for the whole new public site.
 *
 * app/globals.css is the authenticated platform's DARK baseline. Three of its
 * rules leak into this light public site and break every form:
 *
 *   1. `:root { color-scheme: dark }`         native widgets render dark
 *   2. `select, select option { background:#242736; color:#e0e6ed }`
 *                                             every <select> is a dark dropdown
 *   3. the global `input:-webkit-autofill` rule sets
 *      `-webkit-text-fill-color:#e0e6ed` + `caret-color:#e0e6ed` +
 *      `-webkit-background-clip:text`
 *                                             typed and autofilled text paints
 *                                             near-white on a white input, and
 *                                             Chrome keeps that state WHILE
 *                                             TYPING — which is exactly the
 *                                             "invisible name/email" defect.
 *
 * globals.css already establishes the escape-hatch pattern for this
 * (`.light-auth-surface`, the white login card). This block is the same
 * pattern for the public site: declare the surface light, then restate every
 * field colour explicitly rather than inheriting anything.
 *
 * Scoped under .new-style-preview, so it is inert everywhere else and the
 * shared globals.css is still not modified. Styling only — no validation or
 * submission behaviour is touched.
 * ------------------------------------------------------------------------- */

.new-style-preview { color-scheme: light; }

.new-style-preview input,
.new-style-preview select,
.new-style-preview textarea {
  color: #07111F;
  background-color: #FFFFFF;
  caret-color: #1E6BE6;
  -webkit-text-fill-color: #07111F;
  border-color: #D3DEEB;
  opacity: 1;
}

/* globals.css paints every option dark; restate both. */
.new-style-preview select,
.new-style-preview select option,
.new-style-preview select optgroup {
  background-color: #FFFFFF;
  color: #07111F;
}

.new-style-preview input::-moz-placeholder, .new-style-preview textarea::-moz-placeholder {
  color: #8797AC;
  -webkit-text-fill-color: #8797AC;
  opacity: 1;
}

.new-style-preview input::placeholder,
.new-style-preview textarea::placeholder {
  color: #8797AC;
  -webkit-text-fill-color: #8797AC;
  opacity: 1;
}

.new-style-preview input:disabled,
.new-style-preview select:disabled,
.new-style-preview textarea:disabled {
  background-color: #F7F9FC;
  color: #8797AC;
  -webkit-text-fill-color: #8797AC;
  cursor: not-allowed;
}

/* Chrome/WebKit autofill. The global baseline voids Chrome's paint with
   `-webkit-background-clip: text`, which on a light surface leaves the grey
   fill and near-white glyphs seen on Book a Demo. Restore normal painting,
   force a white inset over Chrome's blue-grey, and restate the text colour —
   autofill ignores `color`, so `-webkit-text-fill-color` is the only lever.
   The 99999s transition keeps Chrome from repainting its own background. */
.new-style-preview input:-webkit-autofill,
.new-style-preview input:-webkit-autofill:hover,
.new-style-preview input:-webkit-autofill:focus,
.new-style-preview input:-webkit-autofill:active,
.new-style-preview textarea:-webkit-autofill,
.new-style-preview textarea:-webkit-autofill:hover,
.new-style-preview textarea:-webkit-autofill:focus,
.new-style-preview select:-webkit-autofill,
.new-style-preview select:-webkit-autofill:hover,
.new-style-preview select:-webkit-autofill:focus {
  -webkit-text-fill-color: #07111F;
  caret-color: #1E6BE6;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  box-shadow: 0 0 0 1000px #FFFFFF inset;
  -webkit-transition: background-color 99999s ease-in-out 0s;
  transition: background-color 99999s ease-in-out 0s;
}

.new-style-preview input:-webkit-autofill:focus,
.new-style-preview textarea:-webkit-autofill:focus,
.new-style-preview select:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px #FFFFFF inset, 0 0 0 3px rgba(30, 107, 230, .12);
  border-color: #1E6BE6;
}

/* Scoped preview styles for the parallel new-style public frontend shell.
 *
 * This is a CSS Module: every class below is hash-scoped at build time, so
 * nothing here can leak into the existing public site. Any temporary preview
 * CSS must stay in this file, beneath the .shell wrapper.
 */

.NewStylePreview_shell__Dwecg {
  /* app/layout.tsx wraps every route in <main style={{ paddingTop: 70 }}> for
   * the existing fixed topbar. That topbar is hidden on this route, so the
   * reserved strip is cancelled here rather than by editing the shared layout. */
  margin-top: -70px;
  min-height: 100vh;
  background: #ffffff;
  color: #07111f;
}

