/* Al Makan v2 — Contact & Reservations form extras (on top of the design-system form classes in src/styles/forms.css).
   Only the bits the global system does not cover: the result notices (no-JS round trip), the JS status area and the form card. */

/* Form card */
.form-card {
  position: relative;
  padding: clamp(1.25rem, 0.5rem + 3vw, 2.75rem);
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.form-card__head { margin-bottom: var(--space-l); }
.form-card__head > * + * { margin-top: var(--space-2xs); }
.form-card__title { font-size: var(--fs-xl); color: var(--brown-500); line-height: var(--lh-heading); }
.form-card__intro { color: var(--color-text-muted); }

/* Result notices after a normal (no-JS) POST → PHP redirects to ?sent=1#form-sent or ?error=…#form-error.
   Hidden by default; shown by :target without JS, or by .is-visible (site-form.js reads the query string). */
.form-notice { display: none; margin-bottom: var(--space-m); scroll-margin-top: calc(var(--header-compact-h) + var(--space-m)); }
.form-notice:target, .form-notice.is-visible { display: flex; }

/* JS status message inside the form */
.am-form-status { scroll-margin-top: calc(var(--header-compact-h) + var(--space-m)); }
.am-form-status:focus { outline: none; }
.am-form-status .am-alert { margin: 0; }

/* Success state: the form is replaced by the thank-you panel (JS only) */
.form-done { text-align: center; padding: var(--space-l) 0 var(--space-s); }
.form-done[hidden] { display: none; }
.form-card.is-done .form-card__head, .form-card.is-done .form-notice { display: none; }
.form-done__icon {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; margin-bottom: var(--space-m);
  border-radius: 50%;
  background: var(--brown-500); color: var(--cream-50);
}
.form-done__title { font-size: var(--fs-xl); color: var(--brown-500); }
.form-done__text { max-width: 44ch; margin: var(--space-xs) auto var(--space-l); color: var(--color-text); }
.form-done:focus { outline: none; }

/* Submit button spinner while sending */
.am-form [type="submit"][aria-disabled="true"] { cursor: progress; }
.form-spinner {
  display: inline-block; width: 1em; height: 1em; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: form-spin .7s linear infinite;
}
@keyframes form-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .form-spinner { animation-duration: 2s; } }
