/* ---------------------------------------------------------------------------
   Enterprise theme for the intake wizard.
   ---------------------------------------------------------------------------
   Loaded last, after bootstrap/style/custom, so it wins without those files
   being edited. The wizard's markup and JavaScript are untouched: this maps the
   existing structure onto the site's palette, typography and control styles so
   the funnel does not look like a different product to the pages that feed it.

   Tokens mirror sections/ent/head.php, including the dark-mode swap.
--------------------------------------------------------------------------- */

:root {
  --te-surface: #ffffff;
  --te-surface-raised: #fafafa;
  --te-ink: #0a0a0b;
  --te-ink-muted: #52525b;
  --te-ink-subtle: #71717a;
  --te-line: #e4e4e7;
  --te-line-strong: #d4d4d8;
  --te-accent: #ff6a00;
  --te-accent-text: #c2410c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --te-surface: #0a0a0b;
    --te-surface-raised: #141416;
    --te-ink: #fafafa;
    --te-ink-muted: #a1a1aa;
    --te-ink-subtle: #8b8b93;
    --te-line: #27272a;
    --te-line-strong: #3f3f46;
    --te-accent: #ff8a3d;
    --te-accent-text: #ff9d5c;
  }
}

/* --- Page ---------------------------------------------------------------- */

body,
#main_container,
.wrapper_in {
  background: var(--te-surface) !important;
  color: var(--te-ink);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.layer { background: var(--te-surface) !important; }

/* --- Header -------------------------------------------------------------- */

/* Logo centred, close button pinned to the right edge. */
#header_in {
  background: var(--te-surface) !important;
  border-bottom: 1px solid var(--te-line);
  box-shadow: none !important;
  padding: 16px 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The theme pins a.close_in to left:20px, so it sat on top of the logo and the
   wrapper's float:right had no effect on it. Anchor it to the right edge. */
#header_in .header_in_close { float: none; }

#header_in .close_in {
  left: auto;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

#header_in .logo { height: 44px; width: auto; }

/* Show the asset that suits the current background rather than filtering one:
   inverting the dark mark flattens the roundel into a solid shape. */
#header_in .te-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  #header_in .te-logo-light { display: none; }
  #header_in .te-logo-dark { display: block; }
}

#header_in .close_in,
#header_in .close_in i {
  color: var(--te-ink-subtle) !important;
  transition: color .15s;
}
#header_in .close_in:hover,
#header_in .close_in:hover i { color: var(--te-ink) !important; }

/* --- Sidebar ------------------------------------------------------------- */

aside {
  border-right: 1px solid var(--te-line);
  padding-right: 32px !important;
}
aside h2 {
  color: var(--te-ink) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}
aside h2 sup { color: var(--te-ink-subtle); }
aside .lead { color: var(--te-ink-muted) !important; font-size: 15px !important; line-height: 1.6; }
aside p { color: var(--te-ink-muted) !important; }

@media (max-width: 991px) {
  aside { border-right: 0; padding-right: 0 !important; }
}

/* --- Question and progress ---------------------------------------------- */

#top-wizard { border-bottom: 1px solid var(--te-line) !important; padding-bottom: 24px !important; margin-bottom: 32px !important; }

#top-wizard h3 {
  color: var(--te-ink-subtle) !important;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px !important;
  letter-spacing: .1em;
  font-weight: 500 !important;
}

.main_question {
  color: var(--te-ink) !important;
  font-size: 30px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
  line-height: 1.2 !important;
}

#progressbar,
.ui-progressbar { background: var(--te-line) !important; height: 2px !important; border-radius: 0 !important; }
#progressbar .ui-progressbar-value,
.ui-widget-header { background: var(--te-accent) !important; border: 0 !important; border-radius: 0 !important; }

/* --- Options ------------------------------------------------------------- */

.radio_questions label,
.form-group.radio_questions label {
  display: block;
  width: 100%;
  border: 1px solid var(--te-line-strong);
  background: var(--te-surface);
  color: var(--te-ink) !important;
  padding: 16px 20px !important;
  margin-bottom: 10px !important;
  font-weight: 500 !important;
  font-size: 15px !important;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.radio_questions label:hover { border-color: var(--te-ink); background: var(--te-surface-raised); }
.radio_questions label:focus-within { outline: 2px solid var(--te-accent-text); outline-offset: 2px; }

/* --- Fields -------------------------------------------------------------- */

.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  background: var(--te-surface) !important;
  border: 1px solid var(--te-line-strong) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--te-ink) !important;
  font-size: 15px !important;
  padding: 12px 16px !important;
  height: auto !important;
}
.form-control:focus,
input:focus,
select:focus,
textarea:focus { border-color: var(--te-ink) !important; box-shadow: none !important; }

label { color: var(--te-ink); font-weight: 500; }

/* --- Buttons ------------------------------------------------------------- */

#bottom-wizard { border-top: 1px solid var(--te-line) !important; padding-top: 24px !important; margin-top: 32px !important; }

.backward,
.forward,
.submit,
button[type="submit"],
input[type="submit"],
.btn {
  border-radius: 0 !important;
  border: 1px solid transparent !important;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  padding: 14px 28px !important;
  text-transform: none !important;
  transition: opacity .15s, border-color .15s;
}

.forward,
.submit,
button[type="submit"],
input[type="submit"] {
  background: var(--te-ink) !important;
  color: var(--te-surface) !important;
}
.forward:hover,
.submit:hover,
button[type="submit"]:hover { opacity: .9; }

.backward {
  background: transparent !important;
  color: var(--te-ink) !important;
  border-color: var(--te-line-strong) !important;
}
.backward:hover { border-color: var(--te-ink) !important; }

/* --- Alerts -------------------------------------------------------------- */

.alert {
  border-radius: 0 !important;
  border: 1px solid var(--te-line-strong) !important;
  background: var(--te-surface-raised) !important;
  color: var(--te-ink) !important;
  font-size: 14px;
}
.alert-danger { border-left: 3px solid var(--te-accent) !important; }

/* --- Summary and misc ---------------------------------------------------- */

.summary,
.list_ok li { color: var(--te-ink-muted) !important; }
.list_ok li:before { color: var(--te-accent) !important; }

hr { border-color: var(--te-line) !important; }
a { color: var(--te-accent-text); }
a:hover { color: var(--te-accent-text); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
