/* justmimic.ai website — forms & legal: /contact, /windows, /privacy, /terms, /go/<slug> and the 404 page.
   Builds on site.css (.shell, .scroll-page, .panel, .field, .pill, .done-check, .hp). Ported from
   lib/features/contact, lib/features/waitlist, lib/features/legal and lib/features/campaign. */

/* --- the card (contact / waitlist 640 wide; legal 820) -------------------------------------------------------------- */
.form-wrap { width: 100%; max-width: 640px; }
.panel { padding: 40px 44px; box-shadow: 0 10px 28px rgba(0, 0, 0, .05); }
.panel.doc { max-width: 820px; padding: 44px 48px 40px; }
:root[data-theme="dark"] .panel { box-shadow: 0 10px 28px rgba(0, 0, 0, .3); }
@media (max-width: 599px) {
  .panel, .panel.doc { padding: 24px 20px; }
}
/* the body sits 40 px (phone 24) under the heading, like the Flutter scaffold */
.scroll-page > .heading { margin-bottom: 40px; }
@media (max-width: 599px) { .scroll-page > .heading { margin-bottom: 24px; } }

/* --- fields: filled, rounded, a label that floats up when the field is focused or filled ---------------------------- */
.field { margin-bottom: 16px; }
.field input, .field textarea, .field select {
  border: 1px solid var(--border); padding: 25px 17px 9px; min-height: 58px; line-height: 1.45;
  transition: border-color .15s;
}
.field textarea { min-height: 0; resize: none; overflow-y: hidden; }
.field input:focus, .field textarea:focus, .field select:focus { border: 1.6px solid var(--ink); padding: 24.4px 16.4px 8.4px; }
.field.bad input, .field.bad textarea, .field.bad select { border-color: var(--error-strong); }
.field input:disabled, .field textarea:disabled, .field select:disabled { opacity: .6; cursor: default; }
.field ::placeholder { color: transparent; transition: color .15s; }
.field :focus::placeholder { color: var(--muted); }
/* the label: inside the field like a placeholder, floating up small when there is something to show */
.field > label.lbl {
  position: absolute; left: 18px; top: 18px; width: calc(100% - 36px); font-size: 16px; line-height: 22px; color: var(--secondary);
  pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform-origin: 0 0; transition: transform .15s var(--ease), color .15s;
}
.field:focus-within > label.lbl, .field.filled > label.lbl,
.field:has(input:not(:placeholder-shown)) > label.lbl, .field:has(textarea:not(:placeholder-shown)) > label.lbl {
  transform: translateY(-11px) scale(.78); width: calc((100% - 36px) / .78); /* the smaller label fits more words */
}
.field:focus-within > label.lbl { color: var(--ink); }
.field.bad > label.lbl { color: var(--error-strong); }
/* the topic dropdown: a chevron on the right */
.field.select > label.lbl { width: calc(100% - 64px); }
.field.select::after {
  content: "expand_more"; font-family: "Material Symbols Rounded"; font-size: 24px; line-height: 1; color: var(--secondary);
  position: absolute; right: 14px; top: 17px; pointer-events: none; font-feature-settings: "liga";
}
.field select { padding-right: 46px; }
.field.select:not(.filled):not(:focus-within) select { color: transparent; } /* nothing chosen: only the label shows */
.field option { color: var(--ink); background: var(--surface); }
/* under the field: help or the error on the left, the counter on the right */
.field .below { display: flex; gap: 12px; align-items: flex-start; margin: 6px 14px 0; font-size: 12.5px; line-height: 1.4; }
.field .below:empty { display: none; }
.field .below .help, .field .below .ferr { margin: 0; }
.field .below .count { margin: 0 0 0 auto; }
.field .help { color: var(--secondary); font-size: 13px; }
.field .ferr { color: var(--error-strong); font-size: 13px; }
.field .ferr:empty { display: none; }
.field.bad .help { display: none; }
.field .count { margin-left: auto; color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }

/* --- the waitlist intro row --------------------------------------------------------------------------------------- */
.intro { display: flex; gap: 12px; align-items: center; margin: 0 0 24px; font-size: 15px; line-height: 1.45; color: var(--secondary); }
.intro .brand { width: 22px; height: 22px; flex: none; color: var(--ink); }

/* --- attachments ---------------------------------------------------------------------------------------------------- */
.attach { margin-top: 12px; }
.attach-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.attach-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--border); font-size: 15px; font-weight: 500;
  transition: background .15s;
}
.attach-btn:hover { background: var(--surface-high); }
.attach-btn[disabled] { opacity: .45; cursor: default; background: transparent; }
.attach-btn .ms { font-size: 18px; }
.attach-btn .spinner { width: 16px; height: 16px; border-width: 2px; }
.small-note { font-size: 13px; line-height: 1.45; color: var(--secondary); }
.chips { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips:empty { display: none; }
.file-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 40px; padding: 0 2px 0 14px; border-radius: 20px;
  background: var(--surface-high); border: 1px solid var(--border); font-size: 14px;
}
.file-chip .ms { font-size: 16px; color: var(--secondary); font-variation-settings: "FILL" 0, "wght" 500; }
.file-chip .nm { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .sz { font-size: 13px; color: var(--secondary); white-space: nowrap; }
.file-chip .x { width: 36px; height: 36px; }
.file-chip .x .ms { font-size: 16px; }
@media (max-width: 599px) { .file-chip .nm { max-width: 150px; } }
.file-err { margin: 10px 0 0; white-space: pre-line; color: var(--error-strong); }
.file-err:empty { display: none; }

/* --- the backend's answer, the send button ------------------------------------------------------------------------ */
.form-err { margin: 16px 0 0; font-size: 14px; line-height: 1.45; color: var(--error-strong); }
.form-err:empty { display: none; }
.submit { margin-top: 24px; width: 240px; height: 60px; font-size: 18px; }
.submit.wide { width: 260px; }
.submit:focus-visible, .thanks .pill:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--lime); }
@media (max-width: 599px) { .submit, .submit.wide { width: 100%; height: 56px; } }

/* --- the thank-you that replaces the form ------------------------------------------------------------------------- */
.thanks { text-align: center; }
.thanks .done-check { margin-bottom: 20px; }
.thanks .done-check .ms { font-size: 30px; }
.thanks h2 { margin: 0; font-size: 24px; line-height: 1.35; font-weight: 700; outline: none; }
.thanks.list h2 { font-size: 26px; line-height: 1.3; }
.thanks p { margin: 10px 0 0; font-size: 16px; line-height: 1.5; color: var(--muted); }
.thanks .pill { margin-top: 28px; width: 240px; height: 60px; font-size: 18px; }
@media (max-width: 599px) {
  .thanks h2 { font-size: 20px; } .thanks.list h2 { font-size: 22px; }
  .thanks .pill { width: 100%; height: 56px; }
}

/* "Rather use email?" under the contact card */
.alt { margin: 24px 0 0; text-align: center; font-size: 15px; line-height: 1.5; color: var(--secondary); }
.alt a { color: var(--ink); padding: 0 4px; overflow-wrap: anywhere; }

/* --- legal documents ------------------------------------------------------------------------------------------------ */
.doc { user-select: text; -webkit-user-select: text; }
.doc h2 { margin: 22px 0 10px; font-size: 21px; line-height: 1.3; font-weight: 700; }
.doc p, .doc li { font-size: 16px; line-height: 1.65; color: var(--legal-text); overflow-wrap: break-word; }
.doc p { margin: 0 0 14px; }
.doc ul { list-style: none; margin: 0 0 14px; padding: 0; }
.doc li { position: relative; margin: 0 0 8px; padding-left: 23px; }
.doc li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.doc strong { font-weight: 600; color: var(--ink); }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0 8px; }
.doc .more { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 0 -12px; }
.doc .more a { display: inline-block; padding: 10px 12px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--ink); }
.doc .more a:hover { background: var(--surface-high); }

/* --- /go/<slug>: a spinner while the campaign is looked up --------------------------------------------------------- */
.go-wait { min-height: 100vh; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.go-wait .spinner { width: 36px; height: 36px; border-width: 3.5px; }

/* --- 404 ------------------------------------------------------------------------------------------------------------ */
.lost { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 0 64px; }
.lost .bud-spot { width: 140px; height: 140px; margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: center; }
.lost .page-sub { max-width: 520px; }
.lost .acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 36px; }
.lost .acts .pill { min-width: 220px; }
@media (max-width: 599px) {
  .lost .bud-spot { width: 110px; height: 110px; }
  .lost .page-sub { white-space: normal; }
  .lost .acts { flex-direction: column; width: 100%; align-items: center; }
  .lost .acts .pill { width: min(100%, 420px); }
}
