/* Qualifying form as an overlay. Booking never happens without it. */

.afm {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 5vh, 64px) 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.afm[hidden] { display: none; }

.afm__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 16, 0.78);
  backdrop-filter: blur(6px);
  animation: afm-fade 0.18s ease;
}

.afm__panel {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin: auto;
  background: var(--bg-2, #161c2a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-lg, 20px);
  padding: clamp(28px, 5vw, 46px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  animation: afm-rise 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.afm__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 50%;
  color: var(--muted, #7a8399);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.afm__close:hover {
  color: var(--white, #fff);
  border-color: var(--accent, #2ab8e8);
}

.afm__intro {
  margin-bottom: 1.6rem;
  padding-right: 40px;
}
.afm__intro h2 {
  font-family: var(--font-head, sans-serif);
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  line-height: 1.15;
  color: var(--white, #fff);
  margin: 0 0 0.6rem;
}
.afm__intro p {
  color: var(--muted, #7a8399);
  font-size: 0.97rem;
  line-height: 1.6;
  margin: 0;
}

/* the form mounts here */
.afm__form { min-height: 120px; }

body.afm-open { overflow: hidden; }

@keyframes afm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes afm-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .afm__backdrop, .afm__panel { animation: none; }
}
