/* ============================================================
   ANIDA LAB — v2 shared MODAL shell (.mx*)
   One light "Apple" modal language for every dialog on the site
   (login, purchase, session, team, promo, newsletter, bookings).
   Palette + type follow hx.css. Loaded globally in layout.php, so
   both the Vue-island modals and the PHP-page dialogs share it.
   ============================================================ */

/* ---------- Backdrop + panel ---------- */
.mx {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; overflow-y: auto;
  background: rgba(20, 20, 18, .5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.mx__panel {
  position: relative; width: 100%; max-width: 460px;
  max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--paper); color: var(--char);
  border: 1px solid rgba(43, 43, 43, .08); border-radius: 18px;
  padding: 38px 38px 32px;
  box-shadow: 0 30px 80px rgba(20, 20, 18, .28);
  text-align: left;
}
.mx__panel--narrow { max-width: 420px; }
.mx__panel--wide { max-width: 500px; }
.mx__panel--center { text-align: center; }

/* ---------- Open / close transition (fade + subtle rise) ---------- */
.mx-enter-active, .mx-leave-active { transition: opacity .28s ease; }
.mx-enter-from, .mx-leave-to { opacity: 0; }
.mx-enter-active .mx__panel, .mx-leave-active .mx__panel {
  transition: transform .34s cubic-bezier(.16, 1, .3, 1), opacity .26s ease;
}
.mx-enter-from .mx__panel, .mx-leave-to .mx__panel {
  transform: translateY(14px) scale(.985); opacity: 0;
}
/* v-show modals (no <Transition>) still get a gentle rise on open. */
.mx--anim .mx__panel { animation: mxRise .38s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes mxRise { from { transform: translateY(14px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .mx-enter-active .mx__panel, .mx-leave-active .mx__panel { transition: none; }
  .mx--anim .mx__panel { animation: none; }
}

/* ---------- Close affordance ---------- */
.mx__close {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; color: var(--char);
  background: transparent; border: 1px solid rgba(43, 43, 43, .14);
  cursor: pointer; transition: background .2s ease, border-color .2s ease;
}
.mx__close:hover { background: rgba(43, 43, 43, .05); border-color: rgba(43, 43, 43, .3); }

/* ---------- Header block ---------- */
.mx__emblem { display: inline-flex; color: var(--char); margin-bottom: 16px; }
.mx__eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); margin: 0 0 12px; }
.mx__title { font-size: clamp(21px, 2.3vw, 27px); line-height: 1.14; font-weight: 500; letter-spacing: -.018em; color: var(--char); margin: 0; }
.mx__sub { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 8px 0 0; }
.mx__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.mx__head .mx__title { padding-right: 8px; }

/* ---------- Fields ---------- */
.mx__field { margin-top: 16px; }
.mx__panel--center .mx__field { text-align: left; }
.mx__label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #8a8780; margin: 0 0 7px; }
.mx__input, .mx__select {
  width: 100%; height: 44px; box-sizing: border-box;
  border: 1px solid rgba(43, 43, 43, .18); border-radius: 10px;
  padding: 0 14px; font-size: 15px; color: var(--char); background: var(--paper);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.mx__input:focus, .mx__select:focus { outline: none; border-color: var(--char); box-shadow: 0 0 0 3px rgba(190, 173, 196, .45); }
.mx__input::placeholder { color: var(--soft); }
.mx__input--code { text-align: center; letter-spacing: .5em; font-size: 19px; height: 52px; }

/* ---------- Buttons (pills, matching hx-cta) ---------- */
.mx__cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; padding: 0 26px; font-size: 15px; text-decoration: none;
  border: 0; border-radius: 999px; cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, opacity .2s ease;
}
.mx__cta--block { width: 100%; }
.mx__cta--primary { background: var(--mauve); color: var(--char); }
.mx__cta--primary:hover:not(:disabled) { background: #b19fba; transform: translateY(-2px); }
.mx__cta--dark { background: var(--char); color: var(--cream); }
.mx__cta--dark:hover:not(:disabled) { transform: translateY(-2px); background: #1f1f1f; }
.mx__cta--secondary { background: transparent; color: var(--char); border: 1px solid rgba(43, 43, 43, .4); }
.mx__cta--secondary:hover:not(:disabled) { background: var(--char); color: var(--cream); border-color: var(--char); }
.mx__cta:disabled { opacity: .45; cursor: default; transform: none; }

/* ---------- Text links ---------- */
.mx__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; margin-top: 18px; }
.mx__link { background: none; border: 0; padding: 0; color: var(--muted); font-size: 14px; cursor: pointer; transition: color .18s ease; }
.mx__link:hover { color: var(--char); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Feedback ---------- */
.mx__error { color: #b4453f; font-size: 13.5px; margin: 14px 0 0; }
.mx__note { font-size: 12px; color: var(--soft); line-height: 1.6; margin: 16px 0 0; }

/* ---------- OR divider + SSO ---------- */
.mx__or { position: relative; text-align: center; margin: 6px 0 16px; }
.mx__or::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: rgba(43, 43, 43, .14); }
.mx__or span { position: relative; background: var(--paper); padding: 0 12px; color: var(--soft); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.mx__sso { margin-top: 22px; }
.mx__sso-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; border: 1px solid rgba(43, 43, 43, .18); border-radius: 12px;
  font-size: 14.5px; text-decoration: none; color: var(--char); background: var(--paper);
  margin-bottom: 10px; transition: background .18s ease, border-color .18s ease;
}
.mx__sso-btn:hover { background: rgba(43, 43, 43, .03); border-color: rgba(43, 43, 43, .3); }

/* ---------- Hairline row lists (offers / prices) ---------- */
.mx__rows { margin-top: 18px; border-top: 1px solid rgba(43, 43, 43, .14); }
.mx__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 2px; border-bottom: 1px solid rgba(43, 43, 43, .14); }
.mx__row-name { font-size: 16px; letter-spacing: -.01em; color: var(--char); }
.mx__row-price { font-size: 15px; color: var(--char); white-space: nowrap; }
.mx__row-price .per { font-size: 12.5px; color: var(--soft); }

/* ---------- Selectable option cards (session/pass pickers) ---------- */
.mx__opt {
  width: 100%; text-align: left; display: flex; flex-direction: column; gap: 4px;
  background: var(--paper); color: var(--char);
  border: 1px solid rgba(43, 43, 43, .12); border-radius: 12px;
  padding: 13px 15px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
  transition: border-color .2s ease, box-shadow .25s ease, transform .2s ease;
}
.mx__opt:hover { border-color: rgba(43, 43, 43, .42); box-shadow: 0 10px 24px rgba(0, 0, 0, .09); transform: translateY(-2px); }
.mx__opt-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mx__opt-name { font-size: 15.5px; font-weight: 500; line-height: 1.25; }
.mx__opt-price { font-size: 14px; white-space: nowrap; }
.mx__opt-sub { font-size: 12.5px; color: #8a8780; line-height: 1.45; }
.mx__optlist { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Inline notice (past / full / needs-pass) ---------- */
.mx__notice { font-size: 13.5px; line-height: 1.5; color: #8a5a2b; background: #f6ecd9; border-radius: 10px; padding: 11px 13px; margin: 0 0 16px; }

/* ---------- Loading spinner ---------- */
.mx__loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; padding: 24px 0; }
.mx__spinner { width: 16px; height: 16px; border: 2px solid rgba(43, 43, 43, .2); border-top-color: var(--char); border-radius: 50%; display: inline-block; animation: mxSpin .7s linear infinite; }
@keyframes mxSpin { to { transform: rotate(360deg); } }

/* ---------- Back link (‹ back) ---------- */
.mx__back { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 13.5px; padding: 0 0 10px; transition: color .18s ease; }
.mx__back:hover { color: var(--char); }

/* ============================================================
   Conditions / terms block — shared by PurchaseModal + SessionModal.
   Class names kept (terms-*) so existing markup needs no change.
   ============================================================ */
.terms-step { margin-top: 8px; text-align: left; }
.terms-step__h { font-size: 17px; font-weight: 500; letter-spacing: -.01em; margin-bottom: 10px; color: var(--char); }
.terms-block { border-top: 1px solid rgba(43, 43, 43, .12); padding: 14px 0 4px; margin-top: 8px; }
.terms-block:first-of-type { margin-top: 0; }
.terms-block__h { font-size: 14px; font-weight: 500; margin-bottom: 4px; color: var(--char); }
.terms-block__p { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin-bottom: 10px; }
.terms-radios { display: flex; gap: 20px; margin-bottom: 6px; }
.terms-check, .terms-radio { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.45; cursor: pointer; padding: 5px 0; color: var(--char); }
.terms-check input, .terms-radio input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--char); flex: none; }
.terms-link { display: inline-block; font-size: 12.5px; color: var(--char); text-decoration: underline; text-underline-offset: 2px; margin: 2px 0 8px; }

@media (max-width: 520px) {
  .mx__panel { padding: 32px 22px 26px; border-radius: 16px; }
  .mx__links { gap: 22px; }
}
