/* "Talk to us" intake questionnaire modal (assets/intake/intake.js).
   Values from the altius-cta-flow-demo-v2 design. Native <dialog> (top layer),
   so it sits above the fixed site nav regardless of stacking contexts.
   Everything is scoped to .aix. */

html.aix-open { overflow: hidden; }

.aix {
  --aix-ink: #190501; --aix-paper: #F7F6FF; --aix-orange: #FA5838; --aix-orange-hover: #D8431F;
  --aix-muted: rgba(25, 5, 1, 0.7); --aix-line: rgba(25, 5, 1, 0.16); --aix-soft: #ECEAF7;
  --aix-ok: #17663F; --aix-err: #B42318;
  --aix-font: Matter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  border: 0; padding: 0; background: transparent; color: var(--aix-ink);
  width: min(520px, calc(100% - 20px)); max-width: none; max-height: calc(100% - 48px);
  overflow: visible; font-family: var(--aix-font);
  -webkit-font-smoothing: antialiased;
}
.aix::backdrop { background: rgba(25, 5, 1, 0.78); }
.aix *, .aix *::before, .aix *::after { box-sizing: border-box; }
.aix :focus-visible { outline: 2px solid var(--aix-orange); outline-offset: 2px; }

.aix__panel {
  position: relative; background: var(--aix-paper); border-radius: 8px;
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: auto;
  padding: 36px 32px 32px;
}
.aix__x {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: transparent; font: 400 24px/1 var(--aix-font); color: var(--aix-ink); cursor: pointer; z-index: 2;
}
.aix__x:hover { background: var(--aix-soft); }

.aix__h { margin: 0 0 8px; padding-right: 36px; font: 600 28px/1.15 var(--aix-font); letter-spacing: -0.01em; color: var(--aix-ink); -webkit-text-fill-color: currentColor; }
.aix__form .aix__h { margin-bottom: 24px; }
.aix__lede { margin: 0 0 28px; font-size: 16px; line-height: 1.5; color: var(--aix-muted); }
.aix__h:focus { outline: none; }

.aix__field { margin-bottom: 20px; }
.aix__field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: var(--aix-ink); }
.aix__hint { margin-left: 6px; font-weight: 400; color: var(--aix-muted); }
.aix__field input, .aix__field select, .aix__field textarea {
  display: block; width: 100%; margin: 0; background: #fff; color: var(--aix-ink);
  border: 1px solid rgba(25, 5, 1, 0.35); border-radius: 4px; padding: 11px 12px;
  font: 400 16px/1.4 var(--aix-font); /* 16px stops iOS zooming on focus */
  height: auto; box-shadow: none;
}
.aix__field textarea { min-height: 84px; resize: vertical; }
.aix__field.is-err input, .aix__field.is-err select, .aix__field.is-err textarea { border-color: var(--aix-err); }
.aix__msg { margin-top: 5px; font-size: 13px; color: var(--aix-err); }
.aix__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.aix__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--aix-orange); color: var(--aix-ink); -webkit-text-fill-color: currentColor;
  border: 1px solid var(--aix-orange); border-radius: 3px; padding: 14px 22px;
  font: 500 16px/1 var(--aix-font); text-decoration: none; cursor: pointer;
}
.aix__btn[disabled] { opacity: 0.6; cursor: progress; }
.aix__btn--ghost { background: transparent; border-color: rgba(25, 5, 1, 0.4); }
.aix__row { display: flex; flex-wrap: wrap; gap: 12px; }
.aix__link { background: none; border: 0; padding: 0; font-family: var(--aix-font); font-size: 15px; color: var(--aix-ink); text-decoration: underline; cursor: pointer; }
.aix__fine { margin: 18px 0 0; font-size: 13px; line-height: 1.5; color: var(--aix-muted); }
.aix__fine a { color: var(--aix-ink); text-decoration: underline; -webkit-text-fill-color: currentColor; }
.aix__preview { margin: 12px 0 0; padding: 8px 10px; border: 1px dashed rgba(25, 5, 1, 0.35); border-radius: 4px; font-size: 13px; color: var(--aix-muted); }

.aix__ok { width: 44px; height: 44px; border-radius: 50%; margin-bottom: 16px; background: var(--aix-ok); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; }

.aix__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 26px; }
.aix__card { display: block; padding: 16px; border: 1px solid rgba(25, 5, 1, 0.3); border-radius: 6px; background: #fff; color: inherit; -webkit-text-fill-color: currentColor; text-decoration: none; }
.aix__card b { display: block; margin-bottom: 4px; font-size: 16px; font-weight: 600; color: var(--aix-ink); }
.aix__card span { font-size: 14px; line-height: 1.45; color: var(--aix-muted); }

/* Qualified: the Google booking page, embedded. Wider dialog so the
   calendar's two-column layout fits. */
.aix.aix--wide { width: min(960px, calc(100% - 20px)); }
.aix__book .aix__lede { margin-bottom: 16px; }
.aix__frame {
  display: block; width: 100%; height: 620px; max-height: calc(100vh - 260px); max-height: calc(100dvh - 260px);
  min-height: 420px; border: 1px solid var(--aix-line); border-radius: 6px; background: #fff;
}
.aix__row--end { justify-content: flex-end; align-items: center; gap: 20px; margin-top: 16px; }

@media (hover: hover) and (pointer: fine) {
  .aix__btn:hover { background: var(--aix-orange-hover); border-color: var(--aix-orange-hover); }
  .aix__btn--ghost:hover { background: var(--aix-soft); border-color: rgba(25, 5, 1, 0.4); }
  .aix__card:hover { border-color: var(--aix-ink); background: var(--aix-soft); }
}

@media (max-width: 820px) {
  .aix__panel { padding: 32px 20px 24px; }
  .aix__cards { grid-template-columns: 1fr; }
}
@media (max-width: 479px) {
  .aix { width: calc(100% - 20px); max-height: calc(100% - 20px); }
  .aix__panel { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); }
  .aix__h { font-size: 24px; }
}
