/* HireFlex funnel pages: application form, booking, not-ready and booking-confirmed.
   Builds on the tokens and components in site.css. */

.tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--mint); color: var(--mint-ink); }
.tick svg { width: 12px; height: 12px; }
.wrap--narrow { max-width: 1000px; }

/* =========================================================
   Application form (Typeform-style)
   ========================================================= */
.apply-dialog {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: var(--surface); color: var(--ink); overflow-y: auto;
}
.apply-dialog::backdrop { background: oklch(22% .12 268 / .4); }
.apply-dialog[open] { animation: dialog-in .35s ease; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
body.apply-open { overflow: hidden; }
body.apply-open .sticky-cta { display: none; }

.apply { position: relative; min-height: 100dvh; display: flex; flex-direction: column; isolation: isolate; overflow: hidden; }
.apply::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 45% at 8% 0%, oklch(87% .08 277 / .5), transparent 70%),
    radial-gradient(35% 40% at 100% 100%, oklch(90% .11 172 / .45), transparent 70%),
    radial-gradient(30% 35% at 95% 10%, oklch(79% .12 254 / .22), transparent 70%);
}
.apply__progress { position: absolute; top: 0; left: 0; right: 0; height: 5px; background: oklch(65% .19 277 / .14); z-index: 2; }
.apply__progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), oklch(72% .15 254)); border-radius: 0 999px 999px 0; transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.apply__progress--static { position: sticky; }
.apply__header { display: flex; align-items: center; justify-content: space-between; padding: 22px clamp(16px, 4vw, 40px); }
.apply__header--page { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.apply__brand img { height: 32px; width: auto; }
.apply__close {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: #fff; border: 1px solid var(--hairline); color: var(--ink); transition: background .2s, transform .2s;
}
.apply__close:hover { background: var(--accent-wash); transform: rotate(90deg); }
.apply__close svg { width: 20px; height: 20px; }
.apply__main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px clamp(16px, 4vw, 40px) 40px; }
#application-form { width: 100%; max-width: 760px; }
.apply__foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px 26px; font-size: 13.5px; color: var(--ink-muted); text-align: center; }
.apply__foot svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

.q__step {
  display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.q__step::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.q__title { margin-top: 16px; font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.15; letter-spacing: -.03em; font-weight: 800; outline: none; text-wrap: balance; }
.q__help { margin-top: 12px; font-size: 1.05rem; color: var(--ink-muted); max-width: 620px; }
.q--enter { animation: q-in .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes q-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .q--enter, .apply-dialog[open] { animation: none; } }

.opts { border: 0; margin: 30px 0 0; padding: 0; display: grid; gap: 10px; max-width: 560px; }
.opts--grid { grid-template-columns: 1fr 1fr; max-width: none; }
.opt {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer;
  background: oklch(100% 0 0 / .9); border: 1.5px solid var(--hairline); border-radius: var(--radius);
  font-weight: 600; font-size: 16px; line-height: 1.35; transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.opt:hover { border-color: var(--accent-soft); transform: translateY(-1px); box-shadow: 0 8px 20px -14px oklch(28% .15 268 / .4); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt__key {
  width: 28px; height: 28px; border-radius: 8px; flex: none; display: grid; place-items: center;
  border: 1.5px solid var(--hairline); background: #fff; font-size: 12.5px; font-weight: 800; color: var(--ink-muted);
  transition: background .15s, color .15s, border-color .15s;
}
.opt__text { flex: 1; }
.opt__check { width: 20px; height: 20px; color: var(--accent); opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; flex: none; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.opt:has(input:checked) .opt__key { background: var(--accent); border-color: var(--accent); color: #fff; }
.opt:has(input:checked) .opt__check { opacity: 1; transform: none; }
.opt:has(input:focus-visible) { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

.q__other { margin-top: 18px; max-width: 560px; }
.q__other[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 14px; font-weight: 700; color: var(--ink); }
.q__other .field__label { display: block; margin-bottom: 8px; }
.field__input, .phone__country {
  width: 100%; height: 54px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--hairline); background: #fff;
  font: 500 16px var(--font); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field__input::placeholder { color: oklch(46% .09 268 / .5); }
.field__input:focus, .phone__country:focus-within { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px oklch(65% .19 277 / .15); }
.contact { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field--full { grid-column: 1 / -1; }
.phone { display: flex; gap: 10px; }
.phone__country { position: relative; width: 116px; flex: none; display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.phone__country::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink-muted); border-bottom: 2px solid var(--ink-muted); transform: rotate(45deg) translateY(-3px); }
.phone__country select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; font-size: 16px; }
.q__note { margin-top: 14px; font-size: 14px; color: var(--ink-muted); }
.q__textarea {
  display: block; width: 100%; margin-top: 30px; padding: 6px 0 12px; resize: none; overflow: hidden; min-height: 64px;
  border: 0; border-bottom: 2px solid var(--accent-soft); background: transparent; border-radius: 0;
  font: 500 clamp(1.25rem, 2.4vw, 1.6rem)/1.4 var(--font); color: var(--ink); transition: border-color .15s;
}
.q__textarea::placeholder { color: oklch(46% .09 268 / .4); }
.q__textarea:focus { outline: none; border-bottom-color: var(--accent); }

.q__error { min-height: 24px; margin-top: 14px; font-size: 14.5px; font-weight: 600; color: oklch(55% .2 25); }
.q__actions { display: flex; align-items: center; gap: 16px; margin-top: 6px; flex-wrap: wrap; }
.q__actions .btn { --pad-y: 16px; --pad-x: 28px; }
.q__actions .btn:disabled { opacity: .7; cursor: progress; transform: none; }
.q__hint { font-size: 13.5px; color: var(--ink-muted); }
.q__hint strong { color: var(--ink); }
.q__back {
  display: inline-flex; align-items: center; gap: 6px; padding: 14px 16px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--hairline); background: #fff; font: 700 15px var(--font); color: var(--ink);
}
.q__back:hover { border-color: var(--accent-soft); }
.q__back svg { width: 16px; height: 16px; }
.q__back[hidden] { display: none; }
.q__actions[hidden], .apply__foot[hidden] { display: none; }

/* Final step: the calendar, inside the same flow */
#application-form[data-question="calendar"], .apply__panel { max-width: 860px; }
.q__done {
  display: inline-flex; align-items: center; gap: 10px; margin: 16px 0 4px; padding: 8px 14px 8px 8px;
  border-radius: 999px; background: #fff; border: 1px solid var(--hairline); font-size: 14px; font-weight: 600; color: var(--ink);
}
.calendar--inline { margin-top: 26px; }
.apply__panel { width: 100%; }

@media (max-width: 760px) {
  .apply__header { padding-top: 18px; padding-bottom: 8px; }
  .apply__brand img { height: 28px; }
  .apply__main { align-items: flex-start; padding-top: 18px; }
  .opts--grid, .contact { grid-template-columns: 1fr; }
  .q__hint { display: none; }
  .q__actions .btn { flex: 1; max-width: none; width: auto; }
}

/* =========================================================
   Booking calendar (inside the form, and on the standalone booking page)
   ========================================================= */
.book-page, .outcome-page { background: var(--surface-alt); min-height: 100dvh; display: flex; flex-direction: column; }
.outcome-page main { flex: 1; }
.calendar {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  min-height: 640px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; color: var(--ink-muted);
}
.calendar svg { width: 44px; height: 44px; color: var(--accent); margin-bottom: 6px; }
.calendar strong { color: var(--ink); font-size: 17px; }
.calendar.has-calendar { display: block; padding: 8px; min-height: 640px; }
@media (max-width: 760px) {
  .apply__header--page { padding-left: 16px; padding-right: 16px; }
  .calendar { padding: 18px; }
  .calendar.has-calendar { padding: 4px; }
}

/* =========================================================
   Not-ready page
   ========================================================= */
.outcome { display: grid; place-items: center; padding: 40px 16px 88px; }
.outcome__card {
  max-width: 640px; width: 100%; background: #fff; border: 1px solid var(--hairline); border-radius: 28px;
  padding: clamp(32px, 6vw, 56px); box-shadow: var(--shadow); text-align: center;
}
.outcome__card h1 { margin-top: 14px; font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.03em; text-wrap: balance; }
.outcome__card .lead { margin-top: 16px; }
.outcome__note { margin-top: 26px; padding: 16px 18px; border-radius: 14px; background: var(--surface-alt); font-size: 14.5px; color: var(--ink-muted); }
.outcome__back { margin-top: 22px; }

/* =========================================================
   Booking confirmed: built from the VSL page's components
   ========================================================= */
.steps-meter { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--ink-muted); }
.steps-meter b { color: var(--ink); font-weight: 700; }
.steps-meter i { font-style: normal; }
.steps-meter__track { width: 120px; height: 6px; border-radius: 999px; background: var(--accent-wash); overflow: hidden; }
.steps-meter__track span { display: block; width: 75%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--mint)); }
.hero .lead strong { color: var(--ink); }
.step-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 800; }
.confirm-page .hero { padding-bottom: clamp(64px, 8vw, 96px); }

/* Steps 2–4 cards with a small visual each */
.how--confirm .step { display: flex; flex-direction: column; }
.step__visual { margin-top: auto; padding-top: 22px; }
.mock-note { margin-top: 8px; font-size: 12px; color: var(--ink-muted); text-align: center; }
.mock-invite { background: var(--surface-alt); border-radius: 16px; padding: 14px; }
.mock-invite__head { display: flex; gap: 12px; align-items: center; }
.mock-invite__head strong { display: block; font-size: 14.5px; }
.mock-invite__head span { font-size: 12.5px; color: var(--ink-muted); }
.mock-invite__icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: #fff; color: var(--accent); flex: none; }
.mock-invite__icon svg { width: 22px; height: 22px; }
.mock-invite__actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.mock-btn { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--hairline); background: #fff; font-size: 12.5px; font-weight: 700; }
.mock-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.mock-sms { background: var(--surface-alt); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 88%; padding: 9px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; }
.bubble--in { align-self: flex-start; background: #fff; border-bottom-left-radius: 5px; }
.bubble--out { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.mock-list { list-style: none; margin: 0; padding: 14px; display: grid; gap: 8px; background: var(--surface-alt); border-radius: 16px; }
.mock-list li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; font-weight: 600; color: var(--ink); background: #fff; border-radius: 10px; padding: 9px 11px; }

/* Card text rules from site.css (.step p) shouldn't restyle the mock-ups */
.step .bubble { margin: 0; font-size: 13.5px; }
.step .bubble--in { color: var(--ink); }
.step .bubble--out { color: #fff; }
.step .mock-note { margin-top: 8px; font-size: 12px; }

/* Tighter hand-off from testimonials into the closing section */
.section--tail { padding-bottom: clamp(48px, 6vw, 72px); }

/* Breakout video cards */
.vcards { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.vcard { background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 12px 12px 24px; box-shadow: var(--shadow); }
.vcard__frame { border-radius: 14px; box-shadow: none; }
.vcard__frame .vsl__btn, .vcard__frame .vsl__btn::before { width: 62px; height: 62px; }
.vcard__frame .vsl__btn svg { width: 22px; height: 22px; margin-left: 4px; }
.vsl__shade--solid { background: radial-gradient(80% 100% at 25% 15%, oklch(38% .17 272), var(--ink-2)); }
.vcard h3 { margin: 18px 10px 0; }
.vcard p { margin: 8px 10px 0; font-size: 15px; color: var(--ink-muted); }

@media (max-width: 960px) {
  .vcards { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 760px) {
  .steps-meter i { display: none; }
  .steps-meter__track { width: 72px; }
}
