/* The sheet stays inside the currently visible Safari viewport, including
   browser chrome / keyboard changes. Environment insets remain in CSS. */
html.sheet-open { overflow: hidden; overscroll-behavior: none; }
#booking.booking-sheet {
  --sheet-gap:18px;
  --sheet-safe-top:env(safe-area-inset-top,0px);
  --sheet-lower-gap:calc(var(--sheet-gap) + env(safe-area-inset-bottom,0px));
  --sheet-upper-gap:calc(24px + env(safe-area-inset-top,0px));
  position:fixed;
  inset:auto calc(18px + env(safe-area-inset-right,0px)) calc(var(--sheet-occluded-bottom,0px) + var(--sheet-lower-gap)) calc(18px + env(safe-area-inset-left,0px));
  box-sizing:border-box;
  width:calc(100% - 36px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px));
  max-width:590px;
  max-height:calc(var(--sheet-visible-height,100dvh) - var(--sheet-lower-gap) - var(--sheet-upper-gap));
  min-height:0;
  margin:0 auto;
  padding:0;
  border:1px solid #ffffffba;
  border-radius:28px;
  background:var(--paper,#fffdf9);
  color:var(--ink,#173638);
  overflow:hidden;
  box-shadow:0 18px 65px rgba(var(--shadow-rgb,18,62,64),.28),0 2px 7px rgba(var(--shadow-rgb,18,62,64),.09);
  transform:translate3d(0,0,0);
  animation:none;
  isolation:isolate;
}
#booking.booking-sheet[open] { display:flex; flex-direction:column; }
#booking.booking-sheet::backdrop { background:rgba(var(--shadow-rgb,18,62,64),.44); }
#booking .sheet-top {
  flex:none;
  position:relative;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  min-height:61px;
  padding:11px 13px 4px;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  cursor:grab;
}
#booking[data-state="dragging"] .sheet-top { cursor:grabbing; }
#booking .sheet-handle {
  position:absolute;
  top:12px;
  left:calc(50% - 20px);
  width:40px;
  height:5px;
  border-radius:8px;
  background:var(--control,#6f918d);
  pointer-events:none;
}
#booking .sheet-close {
  display:grid;
  place-items:center;
  flex:none;
  position:relative;
  width:44px;
  height:44px;
  min-height:44px;
  padding:0;
  border:0;
  border-radius:50%;
  background:var(--teal-soft,#eaf7f5);
  color:var(--teal,#006b70);
  touch-action:manipulation;
}
#booking .sheet-close::before,#booking .sheet-close::after {
  content:"";
  position:absolute;
  width:17px;
  height:2px;
  border-radius:2px;
  background:currentColor;
  transform:rotate(45deg);
}
#booking .sheet-close::after { transform:rotate(-45deg); }
#booking .sheet-close:hover { background:var(--line,#d0dfda); }
#booking .sheet-close:focus-visible { outline:3px solid var(--focus,#006b70); outline-offset:2px; }
#booking .sheet-body {
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding:0 clamp(22px,4vw,32px) 26px;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y pinch-zoom;
  user-select:text;
  -webkit-user-select:text;
  scrollbar-width:thin;
}
#booking .sheet-label { color:var(--muted,#4e6562); font-size:14px; font-weight:700; line-height:1.4; margin:0 0 8px; }
#booking .sheet-body h2 {
  font-size:clamp(27px,4vw,38px);
  line-height:1.1;
  letter-spacing:-.035em;
  overflow-wrap:anywhere;
  text-wrap:balance;
  margin:0 0 13px;
}
#booking .sheet-body h2:focus { outline:none; }
#booking #booking-help { font-size:16px; line-height:1.5; color:var(--muted,#4e6562); margin:0 0 20px; }
#booking .sheet-branch { border-top:1px solid var(--line,#d0dfda); padding:17px 0 14px; }
#booking .sheet-branch:last-child { padding-bottom:0; }
#booking .sheet-branch h3 { font-size:18px; line-height:1.3; letter-spacing:-.02em; margin:0 0 6px; }
#booking .phones { display:flex; flex-wrap:wrap; align-items:center; gap:1px 18px; }
#booking .sheet-chat { display:inline-flex; align-items:center; gap:7px; min-height:44px; color:var(--teal); font-size:16px; font-weight:700; }
#booking .sheet-chat .icon { width:18px; height:18px; }
#booking .number {
  display:inline-flex;
  align-items:center;
  min-height:44px;
  max-width:100%;
  padding:5px 0;
  color:var(--teal,#006b70);
  font-size:18px;
  font-weight:700;
  line-height:1.35;
  white-space:nowrap;
  -webkit-user-select:text;
  touch-action:manipulation;
}
@media(max-width:360px) {
  #booking.booking-sheet { --sheet-gap:16px; inset-inline:calc(16px + env(safe-area-inset-left,0px)) calc(16px + env(safe-area-inset-right,0px)); width:calc(100% - 32px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)); border-radius:25px; }
  #booking .sheet-body { padding-inline:20px; }
  #booking .number { font-size:17px; }
}
@media(max-height:450px) {
  #booking.booking-sheet { --sheet-upper-gap:calc(14px + env(safe-area-inset-top,0px)); --sheet-gap:16px; border-radius:22px; }
  #booking .sheet-top { min-height:52px; padding-top:6px; }
}
@media(prefers-reduced-motion:reduce) {
  #booking.booking-sheet { scroll-behavior:auto; }
}

@media(min-width:1025px) {
  #booking.booking-sheet {
    inset-block:calc(24px + env(safe-area-inset-top,0px)) calc(var(--sheet-occluded-bottom,0px) + 24px + env(safe-area-inset-bottom,0px));
    margin-block:auto;
    height:fit-content;
    max-height:calc(var(--sheet-visible-height,100dvh) - 48px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
    border-radius:24px;
  }
}

#booking .scroll-hint {
  position:absolute; bottom:8px; left:50%; transform:translateX(-50%); width:44px; height:44px;
  display:grid; place-items:center; padding:0; border:0; border-radius:50%; background:transparent;
}
.scroll-hint svg {
  width:29px; height:29px; padding:5px; border-radius:50%; color:#fff; background:var(--teal);
  box-shadow:0 1px 5px #102e4140; fill:none; stroke:currentColor; stroke-width:2;
  stroke-linecap:round; stroke-linejoin:round;
}
@media(prefers-reduced-motion:no-preference) {
  .scroll-hint:not([hidden]) svg { animation:scroll-arrow 1.2s ease-in-out 3; }
  @keyframes scroll-arrow { 50% { transform:translateY(3px); } }
}
