/* Little Tyvy Montessori - Book a Tour page
   Companion to home.css and pages.css. Both must load FIRST: they define the design
   tokens (--cream, --green, --serif, ...) on .ty-page. Everything here is scoped under
   .ty-page so nothing leaks into the rest of the WordPress site. */

/* ------------------------------------------------------------------ hero */
.ty-phero--book { text-align: left; }
.ty-bookhero { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 72px; padding: 72px 0 84px; }
.ty-bookhero .ty-crumbs { justify-content: flex-start; }
.ty-bookhero h1 { font-size: clamp(36px, 4.6vw, 54px); }
.ty-bookhero__lead { margin-top: 22px; max-width: 480px; font-size: 15.5px; line-height: 1.78; }
.ty-bookhero .ty-checks { margin-top: 30px; }

/* ------------------------------------------------------------- form card */
.ty-booksec { background: var(--cream); padding: 72px 0 100px; }
.ty-bookcard { max-width: 780px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 60px -34px rgba(60, 58, 44, .32); overflow: hidden; }
.ty-bookcard__head { background: var(--green); text-align: center; padding: 42px 32px 40px; }
.ty-page .ty-bookcard__head .ty-eyebrow { color: rgba(255, 255, 255, .88); margin-bottom: 14px; }
.ty-page .ty-bookcard__head h2 { color: #fff; font-size: clamp(28px, 3.2vw, 36px); }
.ty-page .ty-bookcard__head p:last-child { margin: 12px auto 0; max-width: 470px; font-size: 14.5px; line-height: 1.7; color: rgba(255, 255, 255, .9); }

/* ------------------------------------------------------------- progress */
.ty-page .ty-prog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 26px 40px 22px; background: var(--cream-2); border-bottom: 1px solid var(--line); }
.ty-page .ty-prog__item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0; padding: 0; text-align: center; }
.ty-prog__item:not(:last-child)::after { content: ''; position: absolute; top: 19px; left: calc(50% + 28px); right: calc(-50% + 28px); height: 1px; background: var(--line); }
.ty-prog__item.is-done:not(:last-child)::after { background: var(--green); }
.ty-page .ty-prog__dot { margin: 0; position: relative; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--white); font-size: 14px; font-weight: 500; color: var(--body); transition: background-color .25s ease, border-color .25s ease, color .25s ease, box-shadow .25s ease; }
.ty-prog__item.is-current .ty-prog__dot { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 0 0 5px rgba(90, 107, 71, .16); }
.ty-prog__item.is-done .ty-prog__dot { border-color: var(--green); color: var(--green); font-size: 0; }
.ty-prog__item.is-done .ty-prog__dot::before { content: '\2713'; font-size: 16px; line-height: 1; }
.ty-page .ty-prog__label { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--body); }
.ty-prog__item.is-current .ty-prog__label { color: var(--green); }
.ty-prog__item.is-done .ty-prog__label { color: var(--ink-2); }

/* ---------------------------------------------------------------- panes */
.ty-panes { padding: 40px 48px 46px; }
.ty-pane[hidden] { display: none; }
.ty-pane:not([hidden]) { animation: ty-pane-in .38s ease both; }
@keyframes ty-pane-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ty-page .ty-pane__count { margin: 0; text-align: right; font-size: 13px; color: var(--body); }
.ty-page .ty-pane__title { margin: 6px 0 0; font-size: clamp(24px, 2.6vw, 28px); outline: none; }
.ty-page .ty-pane__sub { margin: 8px 0 0; font-size: 14.5px; line-height: 1.7; }

/* --------------------------------------------------------------- fields */
.ty-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; margin-top: 30px; }
.ty-page .ty-field { display: block; margin: 0; }
.ty-field--full { grid-column: 1 / -1; }
.ty-label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.ty-req { color: var(--gold); margin-left: 3px; }
.ty-opt { margin-left: 6px; font-size: 12px; font-weight: 400; letter-spacing: .02em; text-transform: none; color: var(--muted); }
.ty-bookform .wpcf7-form-control-wrap { display: block; }

.ty-page .ty-bookform input[type='text'],
.ty-page .ty-bookform input[type='email'],
.ty-page .ty-bookform input[type='tel'],
.ty-page .ty-bookform input[type='date'],
.ty-page .ty-bookform select,
.ty-page .ty-bookform textarea { display: block; width: 100%; max-width: 100%; height: 52px; margin: 0; padding: 0 16px; background-color: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: none; font-family: var(--sans); font-size: 15px; font-weight: 400; line-height: 1.4; color: var(--ink); transition: border-color .2s ease, box-shadow .2s ease; }
.ty-page .ty-bookform input[type='text'],
.ty-page .ty-bookform input[type='email'],
.ty-page .ty-bookform input[type='tel'],
.ty-page .ty-bookform select,
.ty-page .ty-bookform textarea { -webkit-appearance: none; appearance: none; }
.ty-page .ty-bookform input[type='date'] { min-height: 52px; }
.ty-page .ty-bookform input[type='date']::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .6; }
.ty-page .ty-bookform textarea { height: auto; min-height: 124px; padding: 14px 16px; line-height: 1.6; resize: vertical; }
.ty-page .ty-bookform select { padding-right: 44px; cursor: pointer; background-repeat: no-repeat; background-position: right 16px center; background-size: 18px 18px; background-image: url('data:image/svg+xml;utf8,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27 fill=%27none%27><path d=%27M5 7.5l5 5 5-5%27 stroke=%27%23575349%27 stroke-width=%271.6%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/></svg>'); }
.ty-page .ty-bookform ::placeholder { color: var(--muted); opacity: .9; }
.ty-page .ty-bookform input:focus,
.ty-page .ty-bookform select:focus,
.ty-page .ty-bookform textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(90, 107, 71, .18); }

/* consent */
.ty-page .ty-consent { margin: 26px 0 0; }
.ty-bookform .ty-consent .wpcf7-list-item { display: block; margin: 0; }
.ty-bookform .ty-consent label { display: flex; align-items: flex-start; gap: 12px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); cursor: pointer; }
.ty-page .ty-bookform .ty-consent input[type='checkbox'] { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green); }

/* errors */
.ty-page .ty-bookform .wpcf7-not-valid,
.ty-page .ty-bookform .is-invalid input,
.ty-page .ty-bookform .is-invalid select,
.ty-page .ty-bookform .is-invalid textarea { border-color: #a4452f; }
.ty-page .ty-bookform .wpcf7-not-valid:focus,
.ty-page .ty-bookform .is-invalid input:focus,
.ty-page .ty-bookform .is-invalid select:focus,
.ty-page .ty-bookform .is-invalid textarea:focus { box-shadow: 0 0 0 3px rgba(164, 69, 47, .16); }
.ty-bookform .wpcf7-not-valid-tip,
.ty-bookform .ty-err { display: block; margin-top: 7px; font-size: 12.5px; line-height: 1.5; color: #a4452f; }

/* ------------------------------------------------------------- actions */
.ty-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 34px; }
.ty-actions--end { justify-content: flex-end; }
.ty-page .ty-actions p { display: flex; align-items: center; margin: 0; }
.ty-btn svg { width: 16px; height: 16px; flex: none; }
.ty-page .ty-bookform .wpcf7-submit { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 32px; margin: 0; border: 0; border-radius: 7px; background: var(--green); color: #fff; font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: .01em; cursor: pointer; transition: background-color .22s ease, transform .22s ease; }
.ty-page .ty-bookform .wpcf7-submit:hover,
.ty-page .ty-bookform .wpcf7-submit:focus { background: var(--green-dk); color: #fff; }
.ty-page .ty-bookform .wpcf7-submit:active { transform: translateY(1px); }
.ty-bookform .wpcf7-spinner { background-color: var(--green); margin: 0 0 0 14px; }

/* CF7 response message */
.ty-page .ty-bookform .wpcf7 form .wpcf7-response-output:empty { display: none; }
.ty-page .ty-bookform .wpcf7 form .wpcf7-response-output { padding: 15px 20px; margin: 0 48px 40px; border: 0; border-left: 2px solid var(--gold); border-radius: 0 8px 8px 0; background: #faf6ee; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.ty-page .ty-bookform .wpcf7 form.invalid .wpcf7-response-output,
.ty-page .ty-bookform .wpcf7 form.unaccepted .wpcf7-response-output,
.ty-page .ty-bookform .wpcf7 form.failed .wpcf7-response-output,
.ty-page .ty-bookform .wpcf7 form.spam .wpcf7-response-output,
.ty-page .ty-bookform .wpcf7 form.aborted .wpcf7-response-output { border-left-color: #a4452f; background: #fbf1ee; }
.ty-page .ty-bookform .wpcf7 form.sent .wpcf7-response-output { border-left-color: var(--green); background: #f3f6ee; }

/* ----------------------------------------------------------- confirmation */
.ty-sent { display: none; text-align: center; padding: 60px 40px 64px; outline: none; }
.ty-bookform.is-sent .ty-sent { display: block; }
.ty-bookform.is-sent .ty-prog,
.ty-bookform.is-sent .ty-panes,
.ty-bookform.is-sent .wpcf7-response-output { display: none; }
.ty-page .ty-sent__icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 24px; border-radius: 50%; background: #eef2e6; color: var(--green); }
.ty-sent__icon svg { width: 28px; height: 28px; }
.ty-page .ty-sent h3 { margin: 0; font-size: clamp(26px, 3vw, 32px); }
.ty-page .ty-sent__msg { max-width: 420px; margin: 14px auto 0; font-size: 14.5px; line-height: 1.75; }
.ty-page .ty-sent__actions { margin: 30px 0 0; }

/* without JavaScript every step is visible at once, so the step controls are not needed */
.ty-bookform:not(.ty-js) .ty-prog,
.ty-bookform:not(.ty-js) [data-ty-next],
.ty-bookform:not(.ty-js) [data-ty-back],
.ty-bookform:not(.ty-js) .ty-pane__count { display: none; }
.ty-bookform:not(.ty-js) .ty-pane + .ty-pane { margin-top: 44px; padding-top: 40px; border-top: 1px solid var(--line-2); }

/* ----------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .ty-bookhero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 56px 0 64px; }
  .ty-bookhero__lead { max-width: 560px; }
  .ty-bookhero .ty-split__media { max-width: 560px; }
}
@media (max-width: 640px) {
  .ty-booksec { padding: 44px 0 72px; }
  .ty-bookcard { border-radius: 16px; }
  .ty-bookcard__head { padding: 32px 22px 30px; }
  .ty-page .ty-prog { padding: 20px 12px 16px; }
  .ty-prog__item:not(:last-child)::after { left: calc(50% + 24px); right: calc(-50% + 24px); }
  .ty-prog__label { font-size: 10px; letter-spacing: .08em; }
  .ty-panes { padding: 30px 22px 34px; }
  .ty-fields { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ty-actions { flex-direction: column-reverse; align-items: stretch; }
  .ty-actions--end { flex-direction: column; }
  .ty-page .ty-actions p { width: 100%; justify-content: center; }
  .ty-actions .ty-btn { width: 100%; }
  .ty-page .ty-bookform .wpcf7-submit { width: 100%; }
  .ty-page .ty-bookform .wpcf7 form .wpcf7-response-output { margin: 0 22px 28px; }
  .ty-sent { padding: 44px 22px 48px; }
}

/* -------------------------------------------------------- second child */
.ty-page .ty-child2 { margin-top: 22px; padding-top: 22px; border-top: 1px dashed var(--line); transition: opacity .2s ease; }
.ty-page .ty-child2[hidden] { display: none; }