.booking-ui .quantity-control {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border: var(--border-width) solid var(--primary-border);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--ink);
}
.booking-ui .quantity-control button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-button);
  flex-shrink: 0;
}
@media (hover: hover) and (pointer: fine) {
  .booking-ui .quantity-control button:hover:not(:disabled) {
    background: var(--primary-soft);
  }
}
.booking-ui .quantity-control output {
  min-width: 26px;
  text-align: center;
  font-size: var(--font-label);
  font-weight: var(--weight-strong);
}
.booking-ui .choice-buttons {
  display: flex;
  gap: var(--space-xs);
}
.booking-ui .choice-buttons > button {
  min-height: 44px;
}
.booking-ui .choice-buttons[data-layout="grid"] {
  display: grid;
}
.booking-ui .amount-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
}
.booking-ui .amount-row > span {
  min-width: 0;
}
.booking-ui .amount-row > strong {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.booking-ui .option-group {
  border: 0;
  padding: 0;
  min-width: 0;
  margin: var(--space-lg) 0;
}
.booking-ui .option-group legend {
  font-weight: var(--weight-strong);
  padding: 0;
}
.booking-ui .option-group-hint {
  margin: var(--space-xs) 0 var(--space-sm);
  color: var(--muted);
  font-size: var(--font-small);
}
.booking-ui .option-group-options {
  display: grid;
  gap: var(--space-sm);
}
.booking-ui .option-choice {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  min-height: 48px;
  padding: var(--space-sm);
  background: #fff;
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-control);
  cursor: pointer;
}
.booking-ui .option-choice.selected {
  border-color: var(--primary-text);
  background: var(--primary-soft);
}
.booking-ui .option-choice:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.booking-ui .option-choice:has(input:focus-visible) input:focus-visible {
  outline: none;
}
.booking-ui .option-choice.unavailable {
  cursor: default;
  color: var(--muted);
}
.booking-ui .option-choice input {
  width: 19px;
  height: 19px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--primary-text);
}
.booking-ui .option-choice-copy {
  flex: 1;
  min-width: 0;
}
.booking-ui .option-choice-copy > small {
  display: block;
  margin-top: var(--space-2xs);
  color: var(--muted);
  font-size: var(--font-small);
}
.booking-ui .option-choice-trailing {
  flex-shrink: 0;
  font-size: var(--font-label);
}
.booking-ui .contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.booking-ui .contact-fields > .field:last-child {
  grid-column: 1 / -1;
}
.booking-ui .note-field textarea {
  width: 100%;
}
.booking-ui .note-field .note-help {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}
.booking-ui .shared-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-control);
  padding: var(--space-sm) var(--space-sm);
  margin: var(--space-sm) 0;
  font-size: var(--font-label);
  background: var(--primary-soft);
  color: var(--ink);
}
.booking-ui .shared-notice > svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.booking-ui .shared-notice-content {
  min-width: 0;
  flex: 1;
}
.booking-ui .shared-notice p {
  margin: 0;
}
.booking-ui .shared-notice.error {
  background: #fff1ef;
  border-color: #edccc3;
  color: var(--error);
}
.booking-ui .shared-notice.warning {
  background: #fff6dc;
  border-color: #e9dcc3;
  color: var(--ink);
}
.booking-ui .shared-notice.success {
  background: #eef7f0;
  border-color: #bbd9c7;
  color: var(--green);
}
.booking-ui .status-panel {
  text-align: center;
}
.booking-ui .status-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.booking-ui .status-panel-icon > svg {
  color: var(--primary-text);
}
.booking-ui .mobile-action-bar {
  display: none;
}
/* Framed dialogs share one scroll owner and one fixed action area. */
.booking-ui .modal.dialog-framed {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100dvh - 48px);
}
.booking-ui .dialog-framed > .modal-heading,
.booking-ui .dialog-framed > .dialog-intro,
.booking-ui .dialog-framed > .dialog-footer {
  flex-shrink: 0;
}
.booking-ui .dialog-framed > .modal-heading {
  position: static;
}
.booking-ui .dialog-framed > .dialog-body {
  min-height: 0;
  overflow-y: auto;
  scroll-padding-block: 16px;
}
.booking-ui .dialog-framed > .dialog-footer {
  position: static;
}
.booking-ui .order-panel-trigger.has-count {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-sm);
  text-align: left;
}
.booking-ui .summary-trigger-count {
  position: relative;
  display: flex;
  align-items: center;
}
.booking-ui .summary-trigger-count b {
  min-width: 20px;
  border-radius: var(--radius-control);
  padding: 2px var(--space-2xs);
  background: var(--primary);
  color: var(--on-primary);
  font-size: var(--font-caption);
  text-align: center;
}
.booking-ui .summary-trigger-content {
  display: flex;
  flex-direction: column;
}
.booking-ui .summary-trigger-content small {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--font-caption);
}
@media (min-width: 701px) {
  .booking-ui .mobile-action-bar {
    display: none !important;
  }
}
@media (max-width: 700px) {
  .booking-ui .mobile-action-bar {
    position: fixed;
    z-index: 100;
    inset: auto 0 0;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-height: 76px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: var(--border-width) solid var(--line);
    background: var(--cream);
    box-shadow: var(--shadow-bar);
  }
  .booking-ui .mobile-action-bar > .button {
    flex: 1;
    min-width: 0;
    max-width: none;
    min-height: 48px;
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-sm);
    font-size: var(--font-label);
  }
  .booking-ui .mobile-action-back {
    width: 44px;
    min-width: 44px;
    min-height: 48px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: var(--border-width) solid var(--line);
    border-radius: var(--radius-control);
    background: #fff;
    color: var(--ink);
  }
  .booking-ui .mobile-action-back > span {
    display: none;
  }
  .booking-ui .mobile-action-back > svg {
    width: 20px;
    height: 20px;
  }
  .booking-ui .mobile-action-bar .order-panel-trigger {
    flex-shrink: 0;
    min-width: 98px;
  }
  .booking-ui .mobile-action-bar .order-panel-trigger strong {
    font:
      800 23px/1.3 BookingBaloo,
      BookingDM;
    font-family: var(--booking-font-family, BookingBaloo, BookingDM);
    white-space: nowrap;
    color: var(--ink);
  }
  .booking-ui[data-booking-dialog-open] .mobile-action-bar,
  .booking-ui[data-booking-keyboard-open] .mobile-action-bar {
    display: none;
  }
  .booking-ui .modal.dialog-framed {
    max-height: 94dvh;
  }
  .booking-ui .modal.dialog-framed.dialog-fullscreen {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .booking-ui .dialog-framed.dialog-fullscreen > .dialog-body {
    flex: 1;
  }
  .booking-ui .dialog-framed > .dialog-footer {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .booking-ui .contact-fields {
    grid-template-columns: 1fr;
  }
}
.booking-ui .shared-icon-button {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
@media (hover: hover) and (pointer: fine) {
  .booking-ui .shared-icon-button:hover:not(:disabled) {
    background: var(--primary-soft);
  }
}

/* Shared start-time and session cards. Keep the first start-time picker as the visual baseline. */
.booking-ui .time-choices-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  /* Keep the 2px focus outline + 2px offset inside the scroll owner's width. */
  padding: 4px;
  margin: 0 0 12px;
}
.booking-ui .time-choices-grid[data-has-end="true"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.booking-ui .time-choice {
  position: relative;
  min-width: 0;
  cursor: pointer;
}
.booking-ui .time-choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 48px;
  height: 100%;
  padding: var(--space-xs) var(--space-2xs);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-control);
  background: var(--cream);
  color: var(--ink);
  font-size: var(--font-label);
  line-height: var(--line-body);
  font-weight: calc(var(--weight-strong) - 100);
  font-variant-numeric: tabular-nums;
}
.booking-ui .time-choice-card small {
  text-align: center;
  font-size: var(--font-caption);
  font-weight: var(--weight-body);
}
.booking-ui .time-choice-availability {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-inline-end: var(--space-xs);
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 1px var(--cream);
}
.booking-ui .time-choice-availability[data-tone="available"] { background: var(--green); }
.booking-ui .time-choice-availability[data-tone="limited"] { background: var(--yellow); }
.booking-ui .time-choice-check {
  position: absolute;
  top: 4px;
  right: 4px;
}
@media (hover: hover) and (pointer: fine) {
  .booking-ui .time-choice:hover input:not(:disabled) + .time-choice-card {
    border-color: var(--primary-text);
  }
}
.booking-ui .time-choice input:checked + .time-choice-card {
  background: var(--primary);
  border-color: var(--primary-text);
  color: var(--on-primary);
}
.booking-ui .time-choice input:focus-visible + .time-choice-card {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.booking-ui .time-choice input:disabled + .time-choice-card {
  background: #f1f1ed;
  color: #70797c;
  cursor: not-allowed;
}
@media (max-width: 700px) {
  .booking-ui .time-choices-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .booking-ui .time-choices-grid[data-has-end="true"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Shared validity summary for all ticket time policies and async states. */
.booking-ui .time-choice-validity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 48px;
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-sm);
}
.booking-ui .time-choice-validity strong {
  font-size: var(--font-subheading);
  font-weight: var(--weight-strong);
  line-height: var(--line-body);
  color: var(--ink);
  white-space: nowrap;
}
.booking-ui .time-choice-validity span {
  font-size: var(--font-label);
  font-weight: var(--weight-body);
  line-height: var(--line-body);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .booking-ui .time-choice-validity {
    min-height: 44px;
    padding: var(--space-sm) 0;
  }
  .booking-ui .time-choice-validity strong {
    font-size: var(--font-subheading);
  }
  .booking-ui .time-choice-validity span {
    font-size: calc(var(--font-label) - 1px);
  }
}
.booking-ui .shared-status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 999px;
  font-size: var(--font-small);
  font-weight: var(--weight-strong);
  background: var(--line);
  color: var(--muted);
}
.booking-ui .shared-status-badge.success { background: color-mix(in srgb, var(--green) 10%, var(--cream)); color: var(--green); }
.booking-ui .shared-status-badge.warning { background: #fff3d7; color: #765500; }
.booking-ui .shared-status-badge.error { background: color-mix(in srgb, var(--error) 10%, var(--cream)); color: var(--error); }
