/* Booking modal — opens the booking widget on top of the current page
   instead of navigating to Microsoft Bookings. Injected by
   /scripts/booking-modal.js; the widget itself (booking/widget/) is
   lazy-loaded only the first time the modal opens. */

.booking-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  visibility: hidden;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.booking-modal:not([hidden]) {
  visibility: visible;
  pointer-events: auto;
}

.booking-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 15, 31, 0.7);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.booking-modal:not([hidden]) .booking-modal__backdrop {
  opacity: 1;
}

.booking-modal__panel {
  position: relative;
  width: min(48rem, 100%);
  max-height: min(42rem, 90vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  transform: scale(0.96);
  opacity: 0;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.booking-modal:not([hidden]) .booking-modal__panel {
  transform: scale(1);
  opacity: 1;
}

.booking-modal__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.booking-modal__close:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-text-light);
}

.booking-modal__loading {
  text-align: center;
  color: var(--color-text-light);
  padding: var(--space-2xl) 0;
}

/* Prevent the page behind the modal from scrolling while it's open. */
html.booking-modal-open {
  overflow: hidden;
}

/* Brand the otherwise-neutral widget to match this site instead of its
   generic default blue, without touching booking-widget.css itself (that
   file is meant to stay a drop-in default for any site embedding it). */
.booking-modal__body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.booking-modal .bw-root {
  --bw-accent: var(--color-cta);
  --bw-focus: var(--color-focus-ring);
  width: 100%;
  max-width: none;
  border: none;
  padding: 0;
}

@media (max-width: 480px) {
  .booking-modal {
    padding: 0;
  }

  .booking-modal__panel {
    width: 100%;
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
  }
}
