/* /consult/apply — one question at a time.
   Loaded after style.css, booking.css and light.css, so it inherits the light
   tokens and the .bk-field / .bk-tick styles. CSP is style-src 'self': every
   state here is a class, and the progress bar width is set through CSSOM. */

.ap {
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--nav-h) + 24px) 24px 96px;
  display: flex; align-items: center; justify-content: center;
}
#ap-form { width: 100%; max-width: 680px; }

.ap-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
  background: var(--surface-2);
}
.ap-progress i {
  display: block; height: 100%; width: 0;
  background: var(--accent-fill); transition: width .35s ease;
}

/* Slides */
.ap-slide { display: none; }
.ap-slide.is-on { display: block; animation: ap-in .38s ease both; }
.ap-slide.is-back { animation-name: ap-in-back; }
@keyframes ap-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes ap-in-back { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ap-slide.is-on { animation: none; }
  .ap-progress i { transition: none; }
}

.ap-slide h1 { font-size: clamp(44px, 7vw, 76px); margin: 10px 0 20px; }
.ap-slide h2 {
  font-family: "Inter", sans-serif; text-transform: none; letter-spacing: -0.01em;
  font-size: clamp(22px, 3.2vw, 30px); font-weight: 500; line-height: 1.3;
  margin-bottom: 28px; color: var(--fg);
}
.ap-slide h2 label { font: inherit; color: inherit; letter-spacing: inherit; text-transform: none; cursor: text; }
.ap-lede { color: var(--muted); font-size: 17px; line-height: 1.7; max-width: 52ch; }

.ap-num {
  display: flex; align-items: center; gap: 6px;
  color: var(--accent); font-size: 14px; font-weight: 600; margin-bottom: 10px;
}
.ap-num span { font-size: 12px; }

/* Choices */
.ap-choices { display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.ap-choice {
  display: flex; align-items: center; gap: 14px; text-align: left;
  font: inherit; font-size: 16px; color: var(--fg); cursor: pointer;
  background: var(--accent-dim); border: 1px solid var(--border);
  padding: 12px 16px; border-radius: 4px;
  transition: background .15s, border-color .15s, transform .08s;
}
.ap-choice:hover { background: rgba(201,168,76,0.26); }
.ap-choice:active { transform: scale(.99); }
.ap-choice kbd {
  flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  font: 600 11px "Inter", sans-serif; color: var(--accent);
  background: #fff; border: 1px solid var(--border); border-radius: 3px;
}
.ap-choice.is-sel { background: var(--accent-fill); border-color: var(--accent-fill); color: #14140f; }
.ap-choice.is-sel kbd { background: #14140f; border-color: #14140f; color: var(--accent-fill); }
.ap-choice.is-flash { animation: ap-flash .3s ease 2; }
@keyframes ap-flash { 50% { opacity: .55; } }

/* Long text */
#ap-challenge {
  width: 100%; resize: none; font: inherit; font-size: 20px; line-height: 1.5;
  color: var(--fg); background: transparent; border: 0; border-radius: 0;
  border-bottom: 1px solid var(--border); padding: 8px 0 10px;
}
#ap-challenge:focus { outline: 0; border-bottom-color: var(--accent-fill); }
#ap-challenge::placeholder { color: var(--muted-2); }

.ap-fields { max-width: 560px; }
.ap-fields input { font-size: 16px; } /* 16px stops iOS zooming on focus */

.ap-actions { display: flex; align-items: center; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
.ap-hint { font-size: 12.5px; color: var(--muted); }
.ap-actions .btn:disabled { opacity: .5; cursor: default; }

.ap-msg { margin-top: 18px; }

.ap-slide[data-slide="done"] { text-align: center; }
.ap-slide[data-slide="done"] .ap-lede { margin: 0 auto; }
.ap-slide[data-slide="done"] .ap-actions { justify-content: center; }
.ap-slide[data-slide="done"] .bk-tick { margin: 0 auto 22px; }

/* Up/down arrows, bottom right, like Typeform */
.ap-nav { position: fixed; right: 20px; bottom: 20px; display: flex; gap: 2px; z-index: 50; }
.ap-nav[hidden] { display: none; }
.ap-nav button {
  width: 38px; height: 34px; font-size: 18px; line-height: 1; cursor: pointer;
  background: var(--accent-fill); color: #14140f; border: 0;
}
.ap-nav button:first-child { border-radius: 4px 0 0 4px; }
.ap-nav button:last-child { border-radius: 0 4px 4px 0; }
.ap-nav button:disabled { opacity: .4; cursor: default; }

@media (max-width: 600px) {
  .ap { align-items: flex-start; padding-top: calc(var(--nav-h) + 40px); padding-left: 16px; padding-right: 16px; }
  .ap-fields { grid-template-columns: 1fr; }
  .ap-hint { display: none; }
}

/* Nav link. Same as /consult/prep's, which /consult itself doesn't load. */
.c-nav-cta {
  font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 10px 20px; border: 1px solid var(--accent); color: var(--accent);
  white-space: nowrap; transition: background .18s, color .18s;
}
.c-nav-cta:hover { background: var(--accent); color: var(--bg); }
@media (max-width: 600px) { .c-nav-cta { font-size: 10.5px; padding: 9px 14px; letter-spacing: .08em; } }

#ap-guide-link { margin-top: 22px; font-size: 15px; }
#ap-guide-link a { color: var(--accent); text-decoration: underline; font-weight: 600; }
