/* A reservation slip from the same paper world as Pip's stage. */
#booking {
  --booking-ink: #263342;
  --booking-paper: #fffdf5;
  --booking-peach: #f3c3a4;
  --booking-accent: #a44128;
  width: min(760px, calc(100% - 32px));
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--booking-paper);
  color: var(--booking-ink);
  box-shadow: 0 24px 90px #14202952;
  scrollbar-width: thin;
  scrollbar-color: #bbaa98 var(--booking-paper);
  color-scheme: light;
}
#booking::backdrop {
  background: #1d2b34b8;
  backdrop-filter: blur(6px);
}
#booking [hidden] { display: none !important; }
#booking .dialog-x {
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--booking-ink);
  transition: background 160ms;
}
#booking .dialog-x svg { width: 19px; height: 19px; }
#booking .dialog-x:hover { background: #2633420d; }
#book-form {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}
.booking-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 36px 28px 30px;
  background: var(--booking-peach);
  border-right: 1px dashed #b78c73;
  overflow: hidden;
}
#booking h2 {
  margin: 0;
  font-size: 48px;
  line-height: 1.02;
  letter-spacing: -.035em;
  text-wrap: balance;
}
#booking h2 > span { color: var(--booking-accent); }
#booking h2:focus { outline: none; }
#booking .form-note {
  margin: 20px 0 0;
  max-width: 22ch;
  font-size: 14px;
  line-height: 1.6;
  color: #594437;
}
#booking .form-note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--booking-ink);
  font-weight: 750;
}
.booking-pip {
  width: 180px;
  margin: auto 0 14px;
  padding-top: 40px;
}
.booking-pip .bird-rig * { animation: none; transition: none; }
.booking-pip .pip-pose { transform: rotate(-22deg); }
.booking-pip .pip-head { transform: rotate(-3deg); }
.booking-pip .pip-wing-near { transform: rotate(67deg) scale(.92, .9); }
.booking-pip .pip-foot-near { transform: rotate(24deg); }
.booking-pip .pip-foot-far { transform: rotate(22deg) scale(.88); }
.booking-pip .pip-eye-joint { display: none; }
.booking-hand {
  font: 24px/1.3 var(--hand);
  color: #713f2b;
  transform: rotate(-4deg);
}
.booking-fields {
  min-width: 0;
  padding: 40px 32px 30px;
}
#book-form label {
  gap: 6px;
  margin: 0;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  color: #46515c;
}
#book-form .booking-details > :is(label, .pair),
#book-form .booking-contact > label + label { margin-top: 14px; }
.booking-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f5deca;
  color: var(--booking-ink);
  font-size: 13px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.booking-session strong {
  font-size: 20px;
  font-weight: 750;
  white-space: nowrap;
}
#book-form select,
#book-form input {
  min-width: 0;
  min-height: 46px;
  border: 1px solid #839093;
  border-radius: 8px;
  padding: 10px 12px;
  background-color: #fffefa;
  color: var(--booking-ink);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 450;
  transition: border-color 160ms, background-color 160ms;
  caret-color: var(--booking-accent);
}
#book-form select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23263342' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}
#book-form :is(input, select):hover { border-color: #78838a; }
#book-form :is(input, select):focus-visible {
  border-color: var(--booking-accent);
  outline: 2px solid var(--booking-accent);
  outline-offset: 2px;
  background-color: #fff;
}
#book-form .pair { gap: 14px; }
.booking-contact {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e4ddd0;
}
#booking .privacy {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #5e665f;
}
#booking .primary {
  min-height: 50px;
  padding: 8px 12px 8px 20px;
  justify-content: space-between;
  background: var(--booking-ink);
  color: #fffdf5;
  font-size: 14px;
}
#booking .primary svg {
  box-sizing: content-box;
  width: 19px;
  height: 19px;
  padding: 7px;
  border-radius: 50%;
  background: var(--booking-peach);
  color: var(--booking-ink);
  transition: transform 180ms cubic-bezier(.16, 1, .3, 1);
}
#booking .primary:hover { background: #374b5e; transform: none; }
#booking .primary:hover svg { transform: translateX(2px); }
#booking .primary:active { background: #1d2834; }
#booking .primary:disabled { opacity: .6; }
#booking :is(button, input, select):disabled { cursor: wait; }
#booking button:focus-visible {
  outline: 2px solid var(--booking-accent);
  outline-offset: 3px;
}
#booking .submit { margin-top: 20px; }
#booking #book-error { margin-top: 14px; color: #9c301d; }
#confirmed { padding: 44px; max-width: 540px; margin: auto; }
#booking:has(#confirmed:not([hidden])) { width: min(540px, calc(100% - 32px)); }
.booking-check {
  display: block;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  fill: #f3c3a4;
  stroke: #263342;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#confirmed h2 { max-width: 9ch; }
#booking #confirmed > p { margin: 18px 0; font-size: 14px; line-height: 1.6; color: #52616a; }
#booking #receipt { padding: 20px 0; border-color: #b9b09e; font-size: 14px; }
#booking .done { width: 100%; }
#booking ::selection { background: #f3c3a4; color: #263342; }
@media (max-width: 660px) {
  #booking {
    width: min(460px, calc(100% - 24px));
    max-height: calc(var(--booking-view-height, 100dvh) - 16px);
    inset-block-start: var(--booking-view-top, 0px);
    inset-block-end: calc(100dvh - var(--booking-view-top, 0px) - var(--booking-view-height, 100dvh));
    border-radius: 14px;
  }
  #booking:has(#book-form:not([hidden])) { overflow: hidden; }
  #book-form {
    display: flex;
    flex-direction: column;
    max-height: calc(var(--booking-view-height, 100dvh) - 16px);
  }
  .booking-intro {
    display: block;
    flex: 0 0 auto;
    padding: 14px 16px 12px;
    border-right: 0;
    border-bottom: 1px dashed #b78c73;
  }
  #booking h2 { max-width: calc(100% - 32px); font-size: 28px; text-wrap: initial; }
  #booking .dialog-x { top: 4px; right: 4px; width: 44px; height: 44px; }
  #booking .form-note { margin-top: 6px; max-width: none; font-size: 12px; line-height: 1.4; }
  #booking .form-note strong { display: inline; margin: 0; }
  .booking-pip, .booking-hand { display: none; }
  .booking-fields {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }
  .booking-details {
    flex: 1 1 auto;
    min-height: 0;
    padding: 14px 16px 10px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scroll-padding: 8px;
  }
  #book-form label { font-size: 12px; line-height: 1.4; gap: 3px; }
  #book-form :is(input, select) { min-height: 44px; padding-block: 8px; }
  #book-form .booking-details > :is(label, .pair),
  #book-form .booking-contact > label + label { margin-top: 10px; }
  .booking-session { margin-top: 6px; padding-block: 5px; }
  .booking-contact { margin-top: 12px; padding-top: 12px; }
  #booking .privacy { margin-top: 10px; font-size: 11.5px; line-height: 1.4; }
  .booking-actions {
    flex: 0 0 auto;
    padding: 10px 16px max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid #e4ddd0;
    background: var(--booking-paper);
  }
  #booking .submit { margin: 0; min-height: 46px; padding-block: 6px; }
  #confirmed { padding: 32px 24px; }
  #confirmed h2 { max-width: 9ch; }
}
@media (max-width: 359px) {
  #book-form .pair { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #booking[open] { animation: none; }
  #booking .primary:hover svg { transform: none; }
}
