/*
 * The Scratching Post booking beta
 *
 * The main site's /css/styles.css supplies the exact site-wide design:
 * colours, type, navigation, page hero, buttons, cards and footer.
 * This file only styles the booking-specific components using those same
 * variables and visual rules.
 */

.booking-beta-page .hidden {
  display: none !important;
}

.booking-beta-hero {
  margin-bottom: clamp(2rem, 6vw, 4.5rem);
}

.booking-beta-label {
  display: inline-block;
  margin-top: 1.35rem;
  padding: .42rem .72rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--turquoise);
  color: var(--ink);
  font-size: .8rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--ink);
}

.booking-wizard-section {
  margin-top: 0;
}

.booking-wizard-heading {
  max-width: 760px;
}

.booking-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .65rem;
  margin: 0 0 1.1rem;
}

.progress-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 58px;
  padding: .65rem .75rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: rgba(255,253,244,.86);
  color: var(--ink-soft);
  font-size: .9rem;
  box-shadow: 4px 4px 0 rgba(17,18,37,.26);
}

.progress-step span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--cream-2);
  color: var(--ink);
  font-weight: 950;
}

.progress-step strong {
  font-weight: 950;
}

.progress-step.active {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.progress-step.active span {
  background: var(--red);
  color: var(--white);
}

.booking-step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 3vw, 1.6rem);
  margin: 0 0 1.4rem;
  padding: clamp(1rem, 3vw, 1.8rem);
  border: 4px solid var(--ink);
  border-radius: calc(var(--radius-lg) + 4px);
  background:
    radial-gradient(circle at 92% 8%, rgba(255,255,255,.65), transparent 10rem),
    linear-gradient(135deg, rgba(255,253,244,.97), rgba(255,230,166,.7));
  box-shadow: 9px 9px 0 rgba(17,18,37,.9), var(--shadow);
  scroll-margin-top: 118px;
}

.booking-step__number {
  display: grid;
  place-items: center;
  width: clamp(3.2rem, 8vw, 5rem);
  height: clamp(3.2rem, 8vw, 5rem);
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 950;
  line-height: 1;
  box-shadow: 6px 6px 0 var(--ink);
}

.booking-step__content {
  min-width: 0;
}

.booking-step h2 {
  max-width: 800px;
  font-size: clamp(2rem, 5vw, 3.45rem);
}

.booking-step h3 {
  margin: 0 0 .45rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  text-transform: uppercase;
}

.booking-step__intro,
.booking-step__content > p:not(.eyebrow),
.booking-help {
  max-width: 760px;
  color: var(--ink-soft);
  font-weight: 650;
}

.booking-label {
  display: block;
  margin: 1.35rem 0 .5rem;
  font-weight: 950;
}

.booking-control,
.booking-age-person select {
  width: min(100%, 520px);
  min-height: 52px;
  padding: .75rem .9rem;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  box-shadow: 4px 4px 0 rgba(17,18,37,.22);
}

.booking-control:focus,
.booking-age-person select:focus {
  outline: 4px solid var(--turquoise);
  outline-offset: 2px;
}

.booking-subsection {
  margin-top: 1.5rem;
}

.booking-divider {
  height: 0;
  margin: 1.5rem 0;
  border-top: 3px dashed rgba(17,18,37,.3);
}

.booking-age-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .9rem;
  margin-top: 1rem;
}

.booking-age-person {
  padding: .9rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  background: rgba(255,253,244,.93);
  box-shadow: 4px 4px 0 rgba(17,18,37,.82);
}

.booking-age-person label {
  display: block;
  margin-bottom: .45rem;
  font-weight: 950;
}

.booking-age-person select {
  width: 100%;
  min-height: 46px;
  box-shadow: none;
}

.booking-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.35rem;
}

.booking-step button {
  font: inherit;
  cursor: pointer;
}

.booking-text-button {
  background: var(--white);
}

.booking-text-button:hover,
.booking-text-button:focus-visible {
  background: var(--turquoise);
}

.booking-confirmation {
  max-width: 790px;
  margin: 1.15rem 0;
  padding: 1rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  background: rgba(255,212,31,.35);
  box-shadow: 4px 4px 0 rgba(17,18,37,.82);
}

.booking-check-row {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  font-weight: 950;
}

.booking-check-row input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: .14rem;
  flex: 0 0 auto;
  accent-color: var(--red);
}

.booking-confirmation p {
  margin: .55rem 0 0 2.05rem;
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 700;
}

.notice {
  max-width: 820px;
  margin: 1.1rem 0;
  padding: 1rem 1.1rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 5px 5px 0 var(--ink);
  overflow: hidden;
}

.notice strong:first-child {
  display: block;
  font-size: 1.12rem;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice.kitten {
  background:
    radial-gradient(circle at 92% 12%, rgba(255,255,255,.62), transparent 7rem),
    linear-gradient(135deg, var(--gold), var(--cream-2));
}

.notice.standard {
  background:
    radial-gradient(circle at 92% 12%, rgba(255,255,255,.62), transparent 7rem),
    linear-gradient(135deg, rgba(0,185,200,.52), rgba(255,253,244,.95));
}

.notice.warn {
  background:
    linear-gradient(135deg, rgba(242,48,48,.22), rgba(255,253,244,.95));
}

.kitten-logo {
  float: right;
  width: 110px;
  height: 110px;
  margin: 0 0 .65rem 1rem;
  object-fit: cover;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 5px 5px 0 var(--ink);
}

.booking-date-block {
  margin-top: 1.25rem;
}

.booking-calendar-button {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding: 0;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: var(--gold);
  color: var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.booking-calendar-button:hover,
.booking-calendar-button:focus-visible {
  outline: none;
  transform: translateY(3px);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--turquoise);
}

.booking-calendar-button svg {
  width: 50px;
  height: 50px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.booking-calendar-button circle {
  fill: var(--red);
  stroke: none;
}

.booking-selected-date {
  display: inline-block;
  margin-top: 1rem;
  padding: .5rem .75rem;
  border: 2px dashed rgba(17,18,37,.42);
  border-radius: 12px;
  color: var(--ink-soft);
  font-weight: 850;
}

.booking-selected-date.has-date {
  border-style: solid;
  border-color: var(--ink);
  background: var(--white);
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(17,18,37,.55);
}

.calendar-popup {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(17,18,37,.58);
  backdrop-filter: blur(3px);
}

.calendar-panel {
  width: min(100%, 430px);
  padding: 1rem;
  border: 4px solid var(--ink);
  border-radius: calc(var(--radius-lg) + 2px);
  background:
    radial-gradient(circle at 92% 8%, rgba(0,185,200,.22), transparent 9rem),
    linear-gradient(135deg, var(--white), var(--cream-2));
  box-shadow: 11px 11px 0 var(--ink), var(--shadow);
}

.calendar-topbar {
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  gap: .65rem;
  align-items: center;
}

.calendar-title {
  margin: 0;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 5vw, 2rem);
  text-transform: uppercase;
}

.calendar-nav {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 3px 3px 0 var(--ink);
}

.calendar-nav:hover,
.calendar-nav:focus-visible {
  background: var(--turquoise);
}

.calendar-nav:disabled {
  opacity: .3;
  cursor: default;
  box-shadow: none;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .3rem;
}

.calendar-weekdays {
  margin: 1rem 0 .45rem;
  color: var(--ink-soft);
  font-size: .73rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.calendar-status {
  min-height: 1.5em;
  margin: .25rem 0 .6rem;
  color: var(--ink-soft);
  font-size: .83rem;
  font-weight: 850;
  text-align: center;
}

.calendar-status.error {
  color: var(--red-dark);
}

.calendar-empty,
.calendar-day {
  aspect-ratio: 1;
}

.calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-weight: 950;
}

.calendar-day.available {
  border-color: var(--ink);
  background: var(--white);
  box-shadow: 2px 2px 0 var(--ink);
}

.calendar-day.available::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--turquoise);
}

.calendar-day.available:hover,
.calendar-day.available:focus-visible {
  background: var(--gold);
  transform: translateY(1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.calendar-day.today {
  outline: 3px solid var(--red);
  outline-offset: 1px;
}

.calendar-day.selected {
  background: var(--red);
  color: var(--white);
}

.calendar-day.selected::after {
  background: var(--white);
}

.calendar-day:disabled {
  color: rgba(17,18,37,.28);
  cursor: default;
  box-shadow: none;
}

.calendar-grid.loading .calendar-day {
  opacity: .35;
}

.calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 3px dashed rgba(17,18,37,.28);
}

body.calendar-open {
  overflow: hidden;
}

.booking-status {
  max-width: 820px;
  margin: 1rem 0;
  padding: .85rem 1rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--cream-2);
  font-weight: 850;
  box-shadow: 4px 4px 0 rgba(17,18,37,.75);
}

.booking-times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
}

.time-card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  min-height: 205px;
  padding: 1rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 85% 12%, rgba(255,255,255,.62), transparent 5rem),
    linear-gradient(135deg, rgba(255,212,31,.85), rgba(0,185,200,.24));
  box-shadow: 6px 6px 0 var(--ink);
}

/* All customer-facing times use the same visual weight. Best-fit table
   allocation remains internal rather than making one time look preferred. */
.time-card.best {
  background:
    radial-gradient(circle at 85% 12%, rgba(255,255,255,.62), transparent 5rem),
    linear-gradient(135deg, rgba(255,212,31,.85), rgba(0,185,200,.24));
}

.time-card .time {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
}

.time-card .meta {
  min-height: 1.5em;
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 750;
}

.time-card .price {
  font-size: 1rem;
  font-weight: 950;
}

.time-card .button {
  margin-top: auto;
}

/* booking.js currently emits "button primary" for dynamically-created time
   buttons. Make that class exactly equivalent to the site's primary button. */
.button.primary {
  background: var(--gold);
}

.booking-summary,
.summary-card {
  margin: 1rem 0;
}

.summary-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 4px solid var(--ink);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 12%, rgba(255,255,255,.62), transparent 7rem),
    linear-gradient(135deg, rgba(0,185,200,.45), rgba(255,212,31,.55));
  box-shadow: 7px 7px 0 var(--ink);
}

.big-time {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 950;
  text-transform: uppercase;
}

.summary-price {
  color: var(--red);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 950;
  text-shadow: 1px 1px 0 var(--ink);
}

.bookwhen-handoff {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem;
  align-items: center;
  margin-top: 1.2rem;
  padding: 1.15rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 5px 5px 0 rgba(17,18,37,.85);
}

.bookwhen-handoff strong {
  font-size: 1.2rem;
}

.bookwhen-handoff p {
  margin: .35rem 0 0;
  color: var(--ink-soft);
  font-weight: 650;
}

.booking-quick-info {
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

.booking-access-note .button {
  margin-top: .5rem;
}

.booking-step .button:disabled,
.calendar-panel .button:disabled {
  opacity: .45;
  cursor: default;
  transform: none;
  box-shadow: 0 3px 0 rgba(17,18,37,.45);
}

@media (max-width: 820px) {
  .booking-progress {
    grid-template-columns: repeat(2, 1fr);
  }

  .booking-step {
    grid-template-columns: 1fr;
  }

  .booking-step__number {
    width: 3.4rem;
    height: 3.4rem;
    font-size: 1.8rem;
  }

  .bookwhen-handoff {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .booking-progress {
    gap: .45rem;
  }

  .progress-step {
    min-height: 48px;
    padding: .45rem;
    font-size: .78rem;
  }

  .progress-step span {
    width: 1.7rem;
    height: 1.7rem;
    flex-basis: 1.7rem;
  }

  .booking-step {
    padding: 1rem;
    border-width: 3px;
    border-radius: 24px;
    box-shadow: 6px 6px 0 rgba(17,18,37,.9);
  }

  .booking-age-grid,
  .booking-times-grid {
    grid-template-columns: 1fr;
  }

  .kitten-logo {
    width: 82px;
    height: 82px;
  }

  .calendar-panel {
    padding: .8rem;
    border-width: 3px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: .18rem;
  }

  .calendar-day {
    font-size: .88rem;
  }

  .summary-card {
    grid-template-columns: 1fr;
  }

  .calendar-footer,
  .booking-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
