/* forms.css — on-site request forms (js/forms.js). Works with style.css (map) and pages.css (other pages). */
:root {
  --fm-surface: var(--surface, #fff);
  --fm-surface-2: var(--surface-2, #F5F7FA);
  --fm-text: var(--text, #1B2633);
  --fm-muted: var(--muted, #5A6878);
  --fm-border: var(--border, #DFE5EC);
  --fm-ink: var(--ink, #12304D);
  --fm-bad: var(--bad, #B03A2E);
  --fm-good: var(--good, #17784A);
  --fm-good-bg: var(--good-bg, #E6F4EC);
  --fm-focus: var(--gold, #F2B33D);
  --fm-accent: var(--navy, #14324F);
}
.fm-dialog, .fm-inline {
  font-family: var(--font, "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif);
  color: var(--fm-text);
  text-align: left;
}
html.fm-lock { overflow: hidden; }

.fm-dialog {
  box-sizing: border-box;
  width: min(580px, calc(100vw - 16px));
  max-width: none;
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--fm-border);
  border-radius: 14px;
  background: var(--fm-surface);
  box-shadow: 0 24px 64px rgba(16, 32, 52, .3);
  overflow: hidden;
}
.fm-dialog[open] { display: flex; flex-direction: column; }
.fm-dialog::backdrop { background: rgba(10, 20, 32, .55); }
.fm-box { display: flex; flex-direction: column; min-height: 0; max-height: inherit; }
.fm-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--fm-border);
}
.fm-title { flex: 1; margin: 0; font-size: 1.15rem; line-height: 1.3; color: var(--fm-ink); }
.fm-x {
  flex: none; width: 36px; height: 36px; margin: -4px -4px 0 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--fm-muted); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.fm-x:hover { background: var(--fm-surface-2); color: var(--fm-text); }
.fm-body { padding: 14px 20px 20px; overflow-y: auto; overscroll-behavior: contain; }

.fm-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.fm-form > p { margin: 0; }
.fm-intro { font-size: .92rem; line-height: 1.5; }
.fm-muted { color: var(--fm-muted); font-size: .85rem; }
.fm-req-note { color: var(--fm-muted); font-size: .82rem; }
.fm-req { color: var(--fm-bad); margin-left: 2px; }

.fm-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fm-label { font-weight: 600; font-size: .9rem; color: var(--fm-ink); }
.fm-field input[type=text], .fm-field input[type=email], .fm-field input[type=url], .fm-field input[type=tel],
.fm-field select, .fm-field textarea {
  box-sizing: border-box; width: 100%; max-width: 100%; min-height: 40px; padding: 8px 10px;
  border: 1px solid var(--fm-border); border-radius: 8px; background: var(--fm-surface); color: var(--fm-text);
  font: inherit; font-size: 1rem;
}
.fm-field textarea { resize: vertical; min-height: 72px; }
.fm-field input:focus-visible, .fm-field select:focus-visible, .fm-field textarea:focus-visible,
.fm-check input:focus-visible, .fm-btn:focus-visible, .fm-x:focus-visible {
  outline: 3px solid var(--fm-focus); outline-offset: 1px;
}
.fm-help { color: var(--fm-muted); font-size: .8rem; line-height: 1.4; }
.fm-check { display: flex; align-items: flex-start; gap: 8px; font-size: .9rem; line-height: 1.4; cursor: pointer; }
.fm-check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; }
.fm-invalid input, .fm-invalid select, .fm-invalid textarea { border-color: var(--fm-bad); }
.fm-err { color: var(--fm-bad); font-size: .82rem; font-weight: 600; }

.fm-context {
  padding: 8px 12px; border-radius: 8px; background: var(--fm-surface-2); font-size: .85rem; overflow-wrap: anywhere;
}
.fm-context ul { margin: 4px 0 0; padding-left: 18px; }
.fm-context li span { color: var(--fm-muted); }

.fm-summary, .fm-fail {
  padding: 10px 12px; border: 1px solid var(--fm-bad); border-radius: 8px; font-size: .88rem;
  background: rgba(176, 58, 46, .07);
}
.fm-summary p, .fm-fail p { margin: 0 0 4px; }
.fm-fail p:last-child { margin-bottom: 0; }
.fm-summary ul { margin: 0; padding-left: 18px; }
.fm-summary a, .fm-fail a { color: inherit; }

/* The honeypot: invisible to people (and to screen readers), still in the form for bots. */
.fm-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.fm-privacy { color: var(--fm-muted); font-size: .8rem; line-height: 1.45; border-top: 1px solid var(--fm-border); padding-top: 10px; }
.fm-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.fm-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 20px;
  border: 1px solid transparent; border-radius: 10px; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
}
.fm-primary { background: var(--fm-focus); color: #14324F; }
.fm-primary:hover { filter: brightness(1.05); }
.fm-btn[disabled] { opacity: .65; cursor: progress; }

.fm-done { padding: 14px 16px; border-radius: 10px; background: var(--fm-good-bg); outline: none; }
.fm-done p { margin: 6px 0 0; }
.fm-done-title { margin: 0; font-size: 1.05rem; color: var(--fm-good); }
.fm-ref { font-size: 1.15em; letter-spacing: .04em; font-variant-numeric: tabular-nums; user-select: all; }
.fm-done .fm-actions { margin-top: 12px; }

@media (max-width: 480px) {
  .fm-head { padding: 12px 10px 10px 14px; }
  .fm-body { padding: 12px 14px 16px; }
  .fm-actions .fm-btn { flex: 1; }
}
@media print { .fm-dialog { display: none !important; } }
