/* Epica on-site booking modal */
.epica-book-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
}

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

.epica-book-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 32, 48, 0.55);
  cursor: pointer;
}

.epica-book-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  height: min(860px, calc(100vh - 24px));
  max-height: calc(100dvh - 24px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(36, 53, 72, 0.28);
  overflow: hidden;
  color: #243548;
}

.epica-book-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 14px 16px 12px 20px;
  border-bottom: 1px solid rgba(74, 122, 168, 0.18);
  background: #fbfcfe;
}

.epica-book-modal__head h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: #243548;
  letter-spacing: 0.01em;
}

.epica-book-modal__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #3a6288;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.epica-book-modal__close:hover {
  background: rgba(74, 122, 168, 0.12);
  color: #243548;
}

.epica-book-modal__close:focus-visible {
  outline: 3px solid #4a7aa8;
  outline-offset: 2px;
}

.epica-book-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  background: #fff;
}

.epica-book-modal__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.epica-book-modal__fallback {
  flex-shrink: 0;
  margin: 0;
  padding: 10px 20px 14px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #5a6b7d;
  border-top: 1px solid rgba(74, 122, 168, 0.14);
  background: #fbfcfe;
}

.epica-book-modal__fallback-link {
  color: #4a7aa8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.epica-book-modal__fallback-link:hover {
  color: #3a6288;
}

body.epica-book-modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .epica-book-modal {
    padding: max(8px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  }

  .epica-book-modal__dialog {
    width: 100%;
    height: calc(100dvh - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 12px;
  }

  .epica-book-modal__head {
    padding: 12px 12px 10px 16px;
  }

  .epica-book-modal__head h2 {
    font-size: 1.05rem;
  }

  .epica-book-modal__fallback {
    padding: 8px 14px 12px;
    font-size: 0.75rem;
  }
}
