/* Booking (FE-6): the steps bar, the packages, the day grid and times, the
   visitor form, and the payment page. The grid is built by
   public/javascripts/bookingCalendar.js. Many bookers are grandparents:
   18px text, buttons at least 44px tall, form boxes with theme.css's
   compact padding, built on the theme.css variables. */

.bk-page {
  max-width: 72rem;
  padding-bottom: 2rem;
  font-size: 1.125rem;
}

.bk-page .btn {
  min-height: 2.75rem;
  font-size: 1.125rem;
}

.bk-page .form-control,
.bk-page .form-select {
  font-size: 1.125rem;
}

.bk-page .form-label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.bk-page .form-text {
  font-size: 1rem;
  color: var(--bs-secondary-color);
}

.bk-org-logo {
  display: block;
  max-width: 16rem;
  margin: 0 auto 1rem;
}

/* the steps bar */

.bk-steps ol {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  max-width: 40rem;
  margin: 0 auto 1.5rem;
  padding: 0;
  list-style: none;
}

.bk-step {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  color: var(--bs-secondary-color);
  font-size: 1rem;
  text-align: center;
  line-height: 1.2;
}

/* the line joining one step to the next */
.bk-step + .bk-step::before {
  content: "";
  position: absolute;
  top: 1rem;
  right: calc(50% + 1.25rem);
  left: calc(-50% + 1.25rem);
  border-top: 2px solid var(--bs-border-color);
}

.bk-step.is-done + .bk-step::before {
  border-color: var(--bs-primary);
}

.bk-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--bs-border-color);
  border-radius: 50%;
  background: var(--bs-body-bg);
  font-weight: 700;
}

.bk-step.is-done .bk-step-num {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.bk-step.is-current {
  color: var(--bs-body-color);
  font-weight: 700;
}

.bk-step.is-current .bk-step-num {
  border-color: var(--bs-primary);
  background: var(--bs-primary);
  color: #fff;
}

/* one step's panel */

.bk-panel {
  scroll-margin-top: 1rem;
}

.bk-heading {
  margin: 0 0 1rem;
  font-size: 1.6rem;
  text-align: center;
}

.bk-note {
  text-align: center;
}

/* step 1: the packages */

.bk-lang {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1.5rem;
}

.bk-lang label {
  font-weight: 600;
}

.bk-lang .form-select {
  width: auto;
  min-width: 15rem;
}

/* The cards share grid rows (subgrid), so names, prices, buttons and
   "More details" line up across the row whatever each card says. */
.bk-pkgs {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .bk-pkgs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.bk-pkg {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: 0;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
  box-shadow:
    0 0 3px 0 rgba(0, 0, 0, 0.12),
    0 2px 2px 0 rgba(0, 0, 0, 0.08);
  text-align: center;
}

.bk-pkg-img {
  width: 100%;
  height: 11rem;
  object-fit: cover;
  object-position: 0 27%;
}

.bk-pkg-about {
  padding: 1rem 1.25rem 0;
}

.bk-pkg-buy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 1.25rem;
}

.bk-pkg-name {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.bk-pkg-facts {
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
}

.bk-pkg-best {
  margin-bottom: 0.75rem;
  color: var(--bs-secondary-color);
  font-style: italic;
}

.bk-pkg-price {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.bk-pkg-note {
  margin: -0.5rem 0 0.75rem;
  font-size: 1rem;
}

.bk-pkg-btn {
  width: 100%;
}

/* a folding box's summary (More details, the code box): no browser
   triangle, a chevron that turns when it opens */
.bk-pkg-more summary,
.bk-key summary {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  cursor: pointer;
  list-style: none;
}
.bk-pkg-more summary::-webkit-details-marker,
.bk-key summary::-webkit-details-marker {
  display: none;
}
.bk-chevron {
  flex: none;
  color: var(--bs-link-color);
  font-size: 0.8em;
  transition: transform 0.2s;
}
details[open] > summary .bk-chevron {
  transform: rotate(180deg);
}

/* "More details" at the bottom of a package card */
.bk-pkg-more {
  padding: 0.5rem 1.25rem 0.75rem;
}

.bk-pkg-more summary {
  justify-content: center;
  gap: 0.5rem;
  color: var(--bs-link-color);
  font-weight: 600;
}

.bk-pkg-more summary:hover {
  color: var(--bs-link-hover-color);
}

.bk-pkg-more-list {
  margin: 0.25rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--bs-border-color);
  list-style: none;
  font-size: 1rem;
  text-align: start;
}

.bk-pkg-more-list li {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.bk-pkg-more-list .fa-check {
  flex: none;
  margin-top: 0.3em;
  color: var(--bs-primary);
  font-size: 0.85em;
}

/* a Santa Key or gift code: a dashed coupon edge, folded until asked for */

.bk-key {
  max-width: 30rem;
  margin: 2rem auto 0;
  padding: 0 1rem;
  border: 2px dashed rgba(var(--bs-primary-rgb), 0.45);
  border-radius: 0.75rem;
  background: rgba(var(--bs-primary-rgb), 0.04);
}

.bk-key summary {
  gap: 0.75rem;
  min-height: 3.5rem;
  font-weight: 600;
}

.bk-key summary:hover .bk-key-text {
  color: var(--bs-link-hover-color);
}

.bk-key-icons {
  display: flex;
  flex: none;
  gap: 0.375rem;
}

.bk-key-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
  font-size: 0.875rem;
}

.bk-key-text {
  flex: 1;
}

.bk-key-form {
  padding-bottom: 1rem;
  text-align: start;
}

.bk-key-row {
  display: flex;
  gap: 0.5rem;
}

.bk-key-row .btn {
  flex: none;
  white-space: nowrap;
}

.bk-key-error {
  margin: 0.5rem 0 0;
  color: var(--bs-danger-text-emphasis);
  font-weight: 600;
}

.bk-key-applied {
  margin: 0.5rem 0 0;
  color: var(--bs-success-text-emphasis);
  font-weight: 600;
}

/* step 2: the package in use, and the day and time */

.bk-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.bk-summary-text {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.bk-tz-fallback {
  max-width: 24rem;
  margin: 0 auto 1rem;
}

/* the month */

.bk-cal {
  max-width: 32rem;
  margin: 0 auto 1.5rem;
  font-size: 1.125rem;
}

.bk-cal-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.bk-cal-month {
  flex: 1;
  margin: 0;
  font-size: 1.4rem;
  text-align: center;
}

.bk-cal-nav {
  min-width: 4.5rem;
  min-height: 3rem;
  padding: 0 0.75rem;
  border: 2px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-size: 1.05rem;
  white-space: nowrap;
}

/* Nothing to go back or forward to; keep the space so the month stays put. */
.bk-cal-nav:disabled {
  visibility: hidden;
}

.bk-cal-note {
  margin: 0 0 0.5rem;
  text-align: center;
}

.bk-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.bk-cal-wd {
  padding: 0.25rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  color: var(--bs-secondary-color);
}

.bk-cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 3.5rem;
  padding: 0.25rem 0;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: #8a8a8a;
  line-height: 1.15;
}

.bk-cal-day:not(:disabled) {
  border-color: rgba(var(--bs-primary-rgb), 0.6);
  background: rgba(var(--bs-primary-rgb), 0.08);
  color: var(--bs-body-color);
  font-weight: 600;
  cursor: pointer;
}

.bk-cal-day[aria-pressed="true"] {
  border-color: var(--bs-primary);
  background: var(--bs-primary);
  color: #fff;
}

.bk-cal-day:focus-visible,
.bk-cal-nav:focus-visible,
.bk-time:focus-visible {
  outline: 3px solid var(--theme-focus-color);
  outline-offset: 2px;
}

.bk-cal-num {
  font-size: 1.15rem;
}

.bk-cal-amt {
  font-size: 0.75rem;
  font-weight: 400;
}

.bk-cal-today .bk-cal-num {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bk-cal-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  margin: 0.75rem 0 0;
  font-size: 1rem;
}

.bk-cal-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.bk-cal-swatch {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--bs-border-color);
  border-radius: 0.25rem;
}

.bk-cal-swatch-open {
  border-color: rgba(var(--bs-primary-rgb), 0.6);
  background: rgba(var(--bs-primary-rgb), 0.08);
}

.bk-cal-empty {
  padding: 2rem 1rem;
  font-size: 1.25rem;
  text-align: center;
}

/* the day's times */

.bk-times {
  text-align: start;
  font-size: 1.125rem;
}

.bk-times-day {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
}

.bk-times-day:focus {
  outline: 0;
}

.bk-times-zone {
  margin-bottom: 0.5rem;
}

.bk-times-group h4 {
  margin: 1rem 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.bk-times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr));
  gap: 0.5rem;
}

.bk-time {
  min-height: 3rem;
  padding: 0.25rem;
  border: 2px solid rgba(var(--bs-primary-rgb), 0.6);
  border-radius: 0.5rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Hover colors only where there is a mouse; on a phone they stick after a
   tap and look chosen. */
@media (hover: hover) {
  .bk-cal-nav:hover {
    border-color: var(--bs-primary);
  }

  .bk-cal-day:not(:disabled):hover {
    background: rgba(var(--bs-primary-rgb), 0.18);
  }

  .bk-cal-day[aria-pressed="true"]:hover {
    background: var(--bs-primary);
  }

  .bk-time:hover {
    border-color: var(--bs-primary);
    background: var(--bs-primary);
    color: #fff;
  }
}

/* the visit they picked, above the visitor form */

.bk-chosen {
  max-width: 36rem;
  margin: 0 auto 1rem;
  padding: 1.25rem 1.5rem;
  border: 2px solid rgba(var(--bs-primary-rgb), 0.6);
  border-radius: 0.75rem;
  background: rgba(var(--bs-primary-rgb), 0.04);
  font-size: 1.125rem;
  text-align: center;
}

.bk-chosen p {
  margin-bottom: 0.25rem;
}

.bk-chosen-label {
  font-size: 1rem;
  color: var(--bs-secondary-color);
}

.bk-chosen-package {
  font-size: 1.25rem;
}

.bk-chosen-when {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--bs-primary);
}

.bk-chosen-change {
  min-height: 3rem;
  margin-top: 0.75rem;
  font-size: 1.1rem;
}

/* step 3: who's coming */

.bk-visitors {
  max-width: 36rem;
  margin: 0 auto;
}

.bk-visitors-intro {
  text-align: center;
}

/* fieldsets are min-content wide by default, wider than a phone */
.bk-visitor {
  min-width: 0;
}

.bk-visitor {
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
}

.bk-visitor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.bk-visitor-legend {
  float: none;
  width: auto;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.bk-visitor-remove {
  padding-inline: 0.5rem;
  text-decoration: underline;
}

.bk-visitor-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 576px) {
  .bk-visitor-fields {
    grid-template-columns: 3fr 2fr;
  }
}

.bk-gender-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

.bk-gender-choices .btn {
  flex: 1 1 5rem;
  padding-inline: 0.5rem;
}

.bk-add-visitor {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
}

.bk-visitors-full {
  text-align: center;
  color: var(--bs-secondary-color);
}

.bk-hold-error p:last-child {
  margin-bottom: 0;
}

.bk-continue {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  font-size: 1.25rem !important;
}

/* /pricing: the package cards, then why we started */

.bk-lead {
  max-width: 40rem;
  margin: 0 auto 2rem;
  font-size: 1.25rem;
  text-align: center;
}

.bk-story {
  max-width: 44rem;
  margin: 3rem auto 0;
}

.bk-story-img {
  width: 100%;
  margin-bottom: 1.5rem;
}

/* the payment page (the cart) */

.bk-checkout,
.bk-checkout-box {
  max-width: 36rem;
  margin: 0 auto;
}

.bk-checkout-box {
  padding: 1.5rem;
  border: 2px solid rgba(var(--bs-primary-rgb), 0.6);
  border-radius: 0.75rem;
  text-align: center;
}

.bk-checkout-box:focus {
  outline: 0;
}

.bk-chosen-total {
  margin-top: 0.5rem;
  font-size: 1.25rem;
}

.bk-chosen-visitors {
  font-size: 1.125rem;
}

.bk-hold-timer {
  font-size: 1rem;
  color: var(--bs-secondary-color);
  font-variant-numeric: tabular-nums;
}

.bk-checkout .bk-key {
  margin: 0 auto 1.5rem;
}

.bk-checkout-section {
  min-width: 0;
  margin-bottom: 1rem;
}

.bk-checkout-section legend {
  float: none;
  text-align: start;
}

/* Square puts the card boxes in here */
.bk-card {
  min-height: 6rem;
}

.bk-terms {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.bk-terms .form-check-input {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.1rem;
  margin-right: 0.5rem;
}

.bk-recaptcha {
  margin-bottom: 1rem;
}

.bk-expired {
  max-width: min(30rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border: 0;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  text-align: center;
}

.bk-expired::backdrop {
  background: rgba(0, 0, 0, 0.5);
}
