/**
 * StretchLAB Booking — Membership consent step.
 *
 * Used for the on-site terms-and-consent step (step 5½) shown after the
 * upsell when a customer has chosen a membership. Inherits booking shell
 * tokens from booking.css; only membership-specific patterns live here.
 *
 * @package StretchLAB
 */

/* ── Eyebrow + price line ───────────────────────────────── */

.mship__eyebrow {
  color: var(--ink) !important;
  opacity: 0.6 !important;
  margin-bottom: 12px !important;
}

.mship__name-em {
  font-style: italic;
  color: var(--yellow);
}

.mship__price-line {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  opacity: 0.7;
  margin: -8px 0 clamp(20px, 2.4vw, 32px);
}

/* ── Card surface ───────────────────────────────────────── */

.mship__card {
  background-color: var(--bone-2);
  border: 1px solid rgba(14, 14, 12, 0.08);
  border-radius: 12px;
  padding: clamp(20px, 2.4vw, 32px);
}

.mship__desc {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  opacity: 0.85;
  margin-bottom: 20px;
}

.mship__desc p {
  margin: 0 0 12px;
}

.mship__desc p:last-child {
  margin-bottom: 0;
}

/* ── Terms label + scrollable agreement ─────────────────── */

.mship__terms-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  opacity: 0.5;
  margin-bottom: 8px;
}

.mship__terms {
  max-height: 280px;
  overflow-y: auto;
  background-color: var(--bone);
  border: 1px solid rgba(14, 14, 12, 0.12);
  border-radius: 8px;
  padding: 18px 20px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
}

.mship__terms:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

.mship__terms p,
.mship__terms li {
  margin: 0 0 10px;
}

.mship__terms p:last-child,
.mship__terms li:last-child {
  margin-bottom: 0;
}

.mship__terms ul,
.mship__terms ol {
  padding-left: 20px;
  margin: 0 0 10px;
}

.mship__terms strong {
  font-weight: 600;
}

/* Subtle scrollbar that matches bone surface */
.mship__terms::-webkit-scrollbar {
  width: 8px;
}

.mship__terms::-webkit-scrollbar-track {
  background: transparent;
}

.mship__terms::-webkit-scrollbar-thumb {
  background-color: rgba(14, 14, 12, 0.18);
  border-radius: 4px;
}

/* ── Cancellation note ──────────────────────────────────── */

.mship__cancel-note {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.7;
  margin: 16px 0 20px;
}

.mship__cancel-note a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(14, 14, 12, 0.4);
  text-underline-offset: 3px;
}

.mship__cancel-note a:hover {
  text-decoration-color: var(--ink);
}

.mship__cancel-note a:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

/* ── Consent checkbox row ───────────────────────────────── */

.mship__consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 14px 16px;
  background-color: var(--bone);
  border: 1px solid rgba(14, 14, 12, 0.12);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}

.mship__consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--ink);
  cursor: pointer;
}

.mship__consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

.mship__consent:has(input:checked) {
  background-color: rgba(200, 224, 0, 0.12);
  border-color: rgba(14, 14, 12, 0.25);
}

/* ── Error state ────────────────────────────────────────── */

.mship__error {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--clay);
  background-color: rgba(198, 93, 59, 0.08);
  border: 1px solid rgba(198, 93, 59, 0.2);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 20px;
}

/* ── Mobile ─────────────────────────────────────────────── */

@media (max-width: 720px) {
  .mship__terms {
    max-height: 220px;
    padding: 14px 16px;
    font-size: 13.5px;
  }

  .mship__card {
    padding: 18px;
  }
}

/* ── Confirmation: partial-failure banner ───────────────── */
/* Renders above the receipt card when /membership/purchase returned
 * {partial:true} (contract live, addappointment failed). Uses --clay
 * per the brand rule that clay appears only on focus + error states. */

.bk__confirm-partial {
  background-color: rgba(198, 93, 59, 0.08);
  border: 1px solid rgba(198, 93, 59, 0.35);
  border-radius: 12px;
  padding: clamp(20px, 2.4vw, 32px);
  margin-bottom: clamp(20px, 2.4vw, 32px);
  text-align: left;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.bk__confirm-partial-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--clay);
  margin: 0 0 12px;
}

.bk__confirm-partial-headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 14px;
}

.bk__confirm-partial-body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 18px;
}

.bk__confirm-partial-cta {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 100px;
  background-color: var(--ink);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.bk__confirm-partial-cta:hover {
  opacity: 0.85;
}

.bk__confirm-partial-cta:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

.bk__confirm-attempted-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  opacity: 0.5;
  margin: 0 0 12px;
  text-align: left;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Confirmation: membership benefits note (success path) ─ */
/* Renders after the receipt card when the membership purchase + first
 * booking both succeeded. Reassures customer about ongoing credits. */

.bk__confirm-mship-note {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  opacity: 0.75;
  margin: 16px auto 0;
  max-width: 540px;
}

.bk__confirm-mship-note a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(14, 14, 12, 0.4);
  text-underline-offset: 3px;
}

.bk__confirm-mship-note a:hover {
  text-decoration-color: var(--ink);
}

.bk__confirm-mship-note a:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}
