/**
 * Wildheart safe-link / booking modal
 * Shared by homepage event CTAs and preorder Payment Links.
 */
:root {
  --wh-booking-linen: #fbf8f2;
  --wh-booking-cream: #fbf8f2;
  --wh-booking-ink: #2c1d17;
  --wh-booking-rust: #c57a43;
  --wh-booking-rust-dark: #a8552c;
}

.modal-overlay.booking-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 1200;
}

.modal-overlay.booking-modal-overlay.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.booking-modal-window {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  border: none;
  background: var(--bg-linen, var(--wh-booking-linen));
  box-shadow: none;
  transform: none;
  opacity: 1;
  transition: opacity 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.booking-modal-overlay.open .booking-modal-window {
  transform: none;
  opacity: 1;
}

.booking-modal-overlay .modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(36, 26, 23, 0.12);
  background: rgba(251, 248, 242, 0.94);
  color: var(--ink, var(--wh-booking-ink));
  font-size: 1.35rem;
  cursor: pointer;
  line-height: 1;
  z-index: 3;
}

.booking-modal-overlay .modal-close-btn:hover {
  background: var(--bg-linen, var(--wh-booking-linen));
}

.booking-modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  position: relative;
}

.booking-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.booking-modal-overlay .modal-iframe-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  background: var(--bg-linen, var(--wh-booking-linen));
  overflow: hidden;
}

.booking-modal-overlay .modal-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
  display: block;
}

.booking-stripe-mount {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-linen, var(--wh-booking-linen));
}

.booking-stripe-mount[hidden] {
  display: none !important;
}

.booking-stripe-mount > * {
  min-height: 100%;
}

.booking-loading {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(165deg, #3b241a 0%, #2a1812 100%);
}

.booking-loading.is-visible {
  display: flex;
}

.booking-loading__card {
  width: min(360px, 100%);
  padding: 2rem 1.75rem;
  border-radius: 18px;
  text-align: center;
  background: rgba(251, 247, 241, 0.06);
  border: 1px solid rgba(217, 137, 92, 0.28);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.booking-loading__wordmark {
  display: block;
  margin-bottom: 0.85rem;
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-white, var(--wh-booking-cream));
}

.booking-loading__title {
  margin: 0 0 0.35rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(251, 247, 241, 0.92);
}

.booking-loading__subtitle {
  margin: 0 0 1.35rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  color: rgba(251, 247, 241, 0.62);
}

.booking-loading__spinner {
  display: inline-block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(217, 137, 92, 0.22);
  border-top-color: #d9895c;
  animation: whBookingSpin 0.85s linear infinite;
}

@keyframes whBookingSpin {
  to {
    transform: rotate(360deg);
  }
}

.booking-backup {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  padding: 0.7rem 1rem;
  padding-bottom: max(0.7rem, env(safe-area-inset-bottom));
  text-align: center;
  background: rgba(251, 247, 241, 0.97);
  border-top: 1px solid rgba(139, 76, 42, 0.12);
}

.booking-backup__label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  color: rgba(59, 36, 26, 0.62);
}

.booking-backup__link {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #a8552c;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.booking-backup__link:hover {
  color: var(--rust-dark, var(--wh-booking-rust-dark));
  opacity: 0.9;
}

.booking-backup__link:focus-visible {
  outline: 2px solid var(--rust, var(--wh-booking-rust));
  outline-offset: 2px;
  border-radius: 4px;
}

.booking-fallback {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(59, 36, 26, 0.94);
  color: var(--cream-white, var(--wh-booking-cream));
  text-align: center;
}

.booking-fallback.is-visible {
  display: flex;
}

/* Intentional Payment Link handoff (not an error recovery state) */
.booking-fallback--handoff .booking-fallback__heart {
  font-size: 1.35rem;
}

.booking-fallback--handoff .booking-fallback__retry {
  display: none;
}

.booking-fallback__card {
  width: min(440px, 100%);
  padding: 1.85rem 1.6rem;
  border-radius: 18px;
  background: rgba(251, 247, 241, 0.06);
  border: 1px solid rgba(217, 137, 92, 0.28);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.booking-fallback__heart {
  display: block;
  margin-bottom: 0.65rem;
  color: #d9895c;
  font-size: 1.15rem;
  line-height: 1;
}

.booking-fallback__title {
  margin: 0 0 0.65rem;
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--cream-white, var(--wh-booking-cream));
}

.booking-fallback__text {
  margin: 0 0 1.35rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(251, 247, 241, 0.86);
}

.booking-fallback__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 50px;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--rust, var(--wh-booking-rust));
  color: var(--cream-white, var(--wh-booking-cream));
  transition: background 0.2s ease, transform 0.2s ease;
}

.booking-fallback__btn:hover {
  background: var(--rust-dark, var(--wh-booking-rust-dark));
}

.booking-fallback__btn:active {
  transform: scale(0.99);
}

.booking-fallback__btn--secondary {
  margin-top: 0.65rem;
  background: transparent;
  color: var(--cream-white, var(--wh-booking-cream));
  border: 1px solid rgba(217, 137, 92, 0.55);
}

.booking-fallback__btn--secondary:hover {
  background: rgba(251, 247, 241, 0.08);
  color: var(--cream-white, var(--wh-booking-cream));
}

.booking-fallback__retry {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0;
  border: none;
  background: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  color: rgba(251, 247, 241, 0.55);
  text-decoration: underline;
  cursor: pointer;
}

.booking-fallback__retry:hover {
  color: rgba(251, 247, 241, 0.8);
}

@media (max-width: 720px) {
  .booking-modal-overlay .modal-close-btn {
    top: 0.75rem;
    right: 0.75rem;
  }

  .booking-backup {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .booking-loading__card,
  .booking-fallback__card {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
