/* Mirrors drmazghodsian.com embedded scheduler (popup + iframe sizing). */

.booking-modal {
  --booking-modal-pad: clamp(12px, 3vw, 28px);
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: var(--booking-modal-pad);
  box-sizing: border-box;
}

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

.booking-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 26, 20, 0.55);
  cursor: pointer;
}

.booking-modal__panel {
  position: relative;
  z-index: 1;
  width: min(860px, calc(100vw - 2 * var(--booking-modal-pad)));
  /* Explicit height so column flex gives the iframe the remaining space (max-height alone
     leaves the panel content-sized and the iframe stays near min-height). */
  height: min(920px, calc(100vh - 2 * var(--booking-modal-pad)));
  max-height: min(920px, calc(100vh - 2 * var(--booking-modal-pad)));
  display: flex;
  flex-direction: column;
  background: var(--paper, #f5f1e6);
  border-radius: 10px;
  box-shadow:
    0 24px 80px rgba(18, 26, 20, 0.28),
    0 0 0 1px rgba(18, 26, 20, 0.08);
  overflow: hidden;
}

@supports (height: 100dvh) {
  .booking-modal__panel {
    height: min(920px, calc(100dvh - 2 * var(--booking-modal-pad)));
    max-height: min(920px, calc(100dvh - 2 * var(--booking-modal-pad)));
  }
}

.booking-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color 0.2s;
}

.booking-modal__close:hover {
  background: rgba(0, 0, 0, 0.75);
}

.booking-modal__frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}

.booking-modal__frame-wrap iframe {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
}

body.booking-modal-open {
  overflow: hidden;
}
