/* ==========================================================================
   Booking modal — full-screen overlay for "Book online" links
   modal.css · vanilla CSS, no dependencies · pairs with modal.js
   All markup is injected by modal.js; nothing is required in the page.
   ========================================================================== */

.bkm,
.bkm *,
.bkm *::before,
.bkm *::after {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Overlay
   -------------------------------------------------------------------------- */

.bkm {
  /* Palette */
  --bkm-surface: #f7fbfc;
  --bkm-body: #ffffff;
  --bkm-ink: #052c3d;
  --bkm-muted: #567783;
  --bkm-deep: #06384d;
  --bkm-deep-hover: #0a4d68;
  --bkm-accent: #087ca8;
  --bkm-backdrop: rgba(2, 24, 35, .68);
  --bkm-hairline: rgba(6, 56, 77, .10);

  /* Shape */
  --bkm-radius: 1.35rem;
  --bkm-shadow: 0 2rem 6rem rgba(0, 21, 31, .36);
  --bkm-gutter: .75rem;

  /* Safe areas — honoured on all four sides */
  --bkm-safe-top: env(safe-area-inset-top, 0px);
  --bkm-safe-right: env(safe-area-inset-right, 0px);
  --bkm-safe-bottom: env(safe-area-inset-bottom, 0px);
  --bkm-safe-left: env(safe-area-inset-left, 0px);

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding:
    calc(var(--bkm-safe-top) + var(--bkm-gutter))
    calc(var(--bkm-safe-right) + var(--bkm-gutter))
    calc(var(--bkm-safe-bottom) + var(--bkm-gutter))
    calc(var(--bkm-safe-left) + var(--bkm-gutter));
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  opacity: 0;
  transition: opacity 200ms ease;
}

.bkm[hidden] {
  display: none;
}

.bkm.is-open {
  opacity: 1;
}

.bkm__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: var(--bkm-backdrop);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.bkm__backdrop:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .7);
  outline-offset: -6px;
}

/* --------------------------------------------------------------------------
   Dialog
   -------------------------------------------------------------------------- */

.bkm__dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(70rem, 96vw);
  height: min(58rem, calc(100vh - 1.5rem - var(--bkm-safe-top) - var(--bkm-safe-bottom)));
  height: min(58rem, calc(100dvh - 1.5rem - var(--bkm-safe-top) - var(--bkm-safe-bottom)));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--bkm-radius);
  background: var(--bkm-surface);
  box-shadow: var(--bkm-shadow);
  transform: translateY(.65rem) scale(.992);
  transition: transform 220ms cubic-bezier(.22, .68, .24, 1);
}

.bkm.is-open .bkm__dialog {
  transform: none;
}

.bkm__dialog:focus {
  outline: none;
}

.bkm__dialog:focus-visible {
  outline: 2px solid var(--bkm-accent);
  outline-offset: -3px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.bkm__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.1rem .8rem;
  border-bottom: 1px solid var(--bkm-hairline);
}

.bkm__heading {
  min-width: 0;
  margin-right: auto;
}

.bkm__eyebrow {
  display: block;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bkm-muted);
}

.bkm__title {
  margin: .2rem 0 0;
  font-family: Newsreader, Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  line-height: 1.18;
  color: var(--bkm-ink);
}

.bkm__external {
  flex: none;
  font-size: .8rem;
  font-weight: 600;
  color: var(--bkm-deep);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid rgba(6, 56, 77, .3);
  padding-bottom: 1px;
  transition: color 160ms ease, border-color 160ms ease;
}

.bkm__external:hover {
  color: var(--bkm-accent);
  border-bottom-color: currentColor;
}

.bkm__external:focus-visible {
  outline: 2px solid var(--bkm-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.bkm__close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  min-width: 5rem;
  min-height: 2.85rem;
  padding: 0 1.05rem;
  border: 0;
  border-radius: 999px;
  background: var(--bkm-deep);
  color: #fff;
  font: inherit;
  font-size: .83rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.bkm__close:hover {
  background: var(--bkm-deep-hover);
}

.bkm__close:active {
  transform: translateY(1px);
}

.bkm__close:focus-visible {
  outline: 2px solid var(--bkm-accent);
  outline-offset: 2px;
}

.bkm__close svg {
  flex: none;
  width: 1rem;
  height: 1rem;
}

/* --------------------------------------------------------------------------
   Body + frame
   -------------------------------------------------------------------------- */

.bkm__body {
  position: relative;
  min-height: 0;
  background: var(--bkm-body);
}

.bkm__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --------------------------------------------------------------------------
   Loader
   -------------------------------------------------------------------------- */

.bkm__loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .95rem;
  padding: 1.5rem;
  text-align: center;
  background: var(--bkm-body);
  transition: opacity 240ms ease, visibility 240ms ease;
}

.bkm__loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.bkm__spinner {
  width: 2.4rem;
  height: 2.4rem;
  border: 2px solid rgba(8, 124, 168, .18);
  border-top-color: var(--bkm-accent);
  border-radius: 50%;
  animation: bkm-spin .78s linear infinite;
}

.bkm__loader-text {
  max-width: 22rem;
  margin: 0;
  font-size: .84rem;
  line-height: 1.5;
  color: var(--bkm-muted);
}

@keyframes bkm-spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.bkm__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .6rem 1.1rem;
  font-size: .71rem;
  line-height: 1.45;
  text-align: center;
  color: var(--bkm-muted);
  border-top: 1px solid var(--bkm-hairline);
}

.bkm__footer a {
  color: var(--bkm-deep);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Phones — edge to edge
   -------------------------------------------------------------------------- */

@media (max-width: 699px) {
  .bkm {
    padding: 0;
    place-items: stretch;
  }

  .bkm__dialog {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    border: 0;
    border-radius: 0;
  }

  .bkm__header {
    padding-top: calc(.8rem + var(--bkm-safe-top));
    padding-right: calc(1rem + var(--bkm-safe-right));
    padding-left: calc(1rem + var(--bkm-safe-left));
  }

  .bkm__body {
    padding-bottom: var(--bkm-safe-bottom);
  }

  .bkm__external,
  .bkm__footer {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Very narrow phones — icon-only close
   -------------------------------------------------------------------------- */

@media (max-width: 364px) {
  .bkm__close {
    min-width: 2.85rem;
    width: 2.85rem;
    padding: 0;
    gap: 0;
  }

  .bkm__close-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .bkm,
  .bkm__dialog,
  .bkm__loader,
  .bkm__close,
  .bkm__external {
    transition: none !important;
  }

  .bkm__dialog {
    transform: none;
  }

  .bkm__spinner {
    animation-duration: 2.4s;
  }
}
