/* The request form and the waiting-list form (a dialog that opens over the page). Used by the main site and by the course page. */

/* ---------- request form (opens over the page) ---------- */
html.rq-lock { overflow: hidden; }
.rq { border: 0; padding: 0; margin: auto; width: min(560px, 100%); max-height: 100dvh; max-height: 100svh; background: var(--cream); color: var(--ink); border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(20, 42, 29, .55); overflow: hidden; overscroll-behavior: contain; }
.rq[open] { display: flex; flex-direction: column; animation: rq-in .35s var(--ease) both; }
.rq::backdrop { background: rgba(20, 42, 29, .6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes rq-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.rq__top { flex: none; position: relative; z-index: 2; background: var(--cream); padding: 0 24px; }
.rq__bar { height: 4px; background: var(--sand); border-radius: 4px; overflow: hidden; margin: 0 -24px; border-radius: 0; }
.rq__bar span { display: block; height: 100%; background: var(--bordeaux); transition: width .45s var(--ease); }
.rq__meta { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.rq__step { font-size: .85rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.rq__x { width: 44px; height: 44px; margin-right: -10px; border: 0; background: transparent; border-radius: 50%; font-size: 1.9rem; line-height: 1; color: var(--forest); cursor: pointer; }
.rq__x:hover { background: var(--sand); }
.rq__form { flex: 1 1 auto; min-height: 0; padding: 4px 24px 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
.rq__form h2 { font-size: clamp(1.7rem, 6vw, 2.2rem); margin: 4px 0 6px; }
.rq__lead { color: var(--muted); margin: 0 0 22px; }
.rq__pill { display: inline-block; margin: 0 0 12px; padding: 6px 14px; border-radius: 999px; background: var(--sand); color: var(--forest); font-size: .88rem; font-weight: 700; }
.rq__group { margin-bottom: 20px; }
.rq__label { display: block; font-size: .95rem; font-weight: 700; margin-bottom: 8px; }
.rq__label i { font-style: normal; font-weight: 400; color: var(--muted); }
.rq input[type="text"], .rq input[type="email"], .rq input[type="tel"], .rq textarea {
  width: 100%; min-height: 54px; padding: 13px 16px; border: 1.5px solid #cfc5b4; border-radius: 12px; background: var(--white); color: var(--ink); font: 400 1rem/1.4 var(--sans);
  transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.rq textarea { min-height: 120px; resize: vertical; }
.rq input:focus, .rq textarea:focus { outline: none; border-color: var(--bordeaux); box-shadow: 0 0 0 3px rgba(109, 31, 43, .16); }
.rq input[aria-invalid="true"], .rq textarea[aria-invalid="true"] { border-color: var(--bordeaux); }
.rq__help { display: block; margin-top: 6px; font-size: .86rem; color: var(--muted); }
.rq__msg { display: block; min-height: 0; margin-top: 6px; font-size: .88rem; font-weight: 700; color: var(--bordeaux); }
.rq__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.rq__chip { min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1.5px solid #cfc5b4; background: var(--white); color: var(--ink); font: 400 .98rem/1 var(--sans); cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.rq__chip:hover { border-color: var(--forest); }
.rq__chip:active { transform: scale(.97); }
.rq__chip.is-on { background: var(--forest); border-color: var(--forest); color: var(--cream); font-weight: 700; }
.rq__fine { font-size: .86rem; color: var(--muted); margin: 4px 0 0; }
.rq__fine a { color: var(--forest); }
.rq__err { margin: 8px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--white); border: 1px solid var(--bordeaux); font-size: .92rem; }
.rq__err a { color: var(--bordeaux); font-weight: 700; }
.rq__foot { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 22px -24px -24px; padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(249, 245, 238, 0), var(--cream) 28%); }
.rq__back { min-height: 48px; padding: 0 6px; border: 0; background: transparent; color: var(--forest); font: 700 1rem/1 var(--sans); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.rq__next { flex: 1; max-width: 260px; margin-left: auto; }
.rq__next:disabled { opacity: .6; pointer-events: none; }
.rq__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rq__thanks { text-align: center; padding-top: 28px; }
.rq__tick { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 50%; background: var(--forest); margin-bottom: 14px; }
.rq__tick svg { width: 30px; height: 30px; fill: none; stroke: var(--cream); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rq__thanks .rq__foot { justify-content: center; background: none; position: static; margin: 18px 0 0; padding: 0; }
@media (max-width: 599px) {
  .rq { width: 100%; max-width: 100%; margin: 0; top: var(--rq-top, 0); height: 100dvh; height: var(--rq-h, 100svh); max-height: none; border-radius: 0; }
  .rq__next { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .rq[open] { animation: none; } .rq__bar span { transition: none; } }

.rq__foot > span:empty { display: none; }

.rq__check { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 18px; font-size: .95rem; line-height: 1.45; cursor: pointer; }
.rq__check input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--bordeaux); cursor: pointer; }
.rq__check .rq__msg { margin-top: 4px; }
