/* BookingFlows public booking theme: the ONE place selectable states are styled.
   Variables are computed by bf-booking-theme.js from the org brand colour and set on the
   widget root (.bf-theme). The fallback colour is defined once, in bf-booking-theme.js.
   Shared classes: .bf-opt (date cell / time slot / option), .bf-price-badge, .bf-step-btn,
   .bf-btn-primary, .bf-btn-secondary, .bf-link, .bf-skeleton. */
.bf-theme {
  /* --bf-brand* variables (and the fallback colour) are set by bf-booking-theme.js */
  --bf-muted-bg: #f3f4f6;
  --bf-muted-text: #9ca3af;
  accent-color: var(--bf-brand-ink);
}

/* ── AVAILABLE: solid brand at full strength ── */
.bf-theme .bf-opt,
.bf-theme .calendar-day.available:not(.disabled):not(.past),
.bf-theme .time-slot-btn:not(.disabled),
.bf-theme .time-slot:not(.disabled),
.bf-theme .time-slot-chip {
  background: var(--bf-brand) !important;
  border-color: var(--bf-brand) !important;
  color: var(--bf-brand-contrast) !important;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s, box-shadow 0.15s;
}
.bf-theme .bf-opt:hover,
.bf-theme .calendar-day.available:not(.disabled):not(.past):hover,
.bf-theme .time-slot-btn:not(.disabled):hover,
.bf-theme .time-slot:not(.disabled):hover,
.bf-theme .time-slot-chip:hover {
  background: var(--bf-brand-hover) !important;
  border-color: var(--bf-brand-hover) !important;
  color: var(--bf-brand-contrast) !important;
}

/* ── SELECTED: darker fill + double ring + check mark (not colour alone) ── */
.bf-theme .bf-opt.is-selected,
.bf-theme .calendar-day.selected:not(.disabled):not(.past),
.bf-theme .time-slot-btn.selected:not(.disabled),
.bf-theme .time-slot.selected:not(.disabled),
.bf-theme .time-slot-chip.selected {
  background: var(--bf-brand-strong) !important;
  border-color: var(--bf-brand-strong) !important;
  color: var(--bf-brand-strong-contrast) !important;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px var(--bf-brand-strong), inset 0 0 0 4px #ffffff !important;
  outline: 2px solid var(--bf-brand-strong);
  outline-offset: 1px;
}
.bf-theme .bf-opt.is-selected::before,
.bf-theme .calendar-day.selected:not(.disabled):not(.past)::before,
.bf-theme .time-slot.selected:not(.disabled)::before,
.bf-theme .time-slot-chip.selected::before {
  content: '\2713';
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
}
.bf-theme .bf-opt.bf-opt-row.is-selected::before { content: none; }
.bf-theme .bf-opt.bf-opt-row.is-selected::after,
.bf-theme .time-slot-btn.selected:not(.disabled)::after {
  content: '\2713';
  font-size: 15px;
  font-weight: 800;
  margin-left: 8px;
}
.bf-theme .calendar-day.today.available:not(.disabled)::after,
.bf-theme .calendar-day.selected.today::after { background: currentColor !important; }
.bf-theme .calendar-day.available .availability-dot { background: currentColor !important; }

/* ── UNAVAILABLE / PAST / SOLD OUT: neutral, inert ── */
.bf-theme .bf-opt.is-disabled,
.bf-theme .bf-opt:disabled,
.bf-theme .calendar-day.disabled:not(.blocked),
.bf-theme .calendar-day.past,
.bf-theme .calendar-day.today.disabled:not(.blocked),
.bf-theme .time-slot-btn.disabled {
  background: var(--bf-muted-bg) !important;
  border-color: transparent !important;
  color: var(--bf-muted-text) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
.bf-theme .bf-opt.is-disabled::before, .bf-theme .bf-opt:disabled::before { content: none; }

/* ── LOADING: neutral skeleton ── */
.bf-theme .bf-opt.is-loading,
.bf-theme .bf-skeleton,
.bf-theme .calendar-day.checking-availability {
  background: #eef0f3 !important;
  color: transparent !important;
  cursor: wait !important;
  box-shadow: none !important;
  animation: bf-skeleton-pulse 1.2s ease-in-out infinite;
}
.bf-theme .calendar-day .day-loader { border-color: #d1d5db !important; border-top-color: #6b7280 !important; }
@keyframes bf-skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ── FOCUS: one keyboard ring everywhere ── */
.bf-theme .bf-opt:focus-visible,
.bf-theme .bf-step-btn:focus-visible,
.bf-theme .bf-btn-primary:focus-visible,
.bf-theme .bf-btn-secondary:focus-visible,
.bf-theme .bf-link:focus-visible,
.bf-theme .calendar-day:focus-visible,
.bf-theme .time-slot-btn:focus-visible,
.bf-theme .quantity-btn:focus-visible,
.bf-theme .party-counter-btn:focus-visible,
.bf-theme .back-to-calendar:focus-visible,
.bf-theme .service-cta:focus-visible,
.bf-theme .btn-primary:focus-visible {
  outline: 3px solid var(--bf-brand-ring) !important;
  outline-offset: 2px;
}
.bf-theme input:focus-visible, .bf-theme textarea:focus-visible, .bf-theme select:focus-visible {
  outline: none;
  border-color: var(--bf-brand-ink) !important;
  box-shadow: 0 0 0 3px var(--bf-brand-ring) !important;
}

/* ── PRICE BADGE ── */
.bf-theme .bf-price-badge,
.bf-theme .price-outline {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--bf-brand) !important;
  color: var(--bf-brand-contrast) !important;
}
.bf-theme .bf-price-badge .bf-price-unit,
.bf-theme .price-outline .price-unit { color: inherit !important; opacity: 0.9; font-weight: 500; }

/* ── STEPPER: minus and plus share one style; disabled is neutral grey ── */
.bf-theme .bf-step-btn,
.bf-theme .quantity-btn,
.bf-theme .party-counter-btn {
  background: var(--bf-brand) !important;
  border: 1px solid var(--bf-brand) !important;
  color: var(--bf-brand-contrast) !important;
  cursor: pointer;
  opacity: 1 !important;
  transition: background-color 0.15s;
}
.bf-theme .bf-step-btn { width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.bf-theme .bf-step-btn.bf-step-sm { width: 32px; height: 32px; }
.bf-theme .bf-step-btn:hover:not(:disabled),
.bf-theme .quantity-btn:hover:not(:disabled),
.bf-theme .party-counter-btn:hover:not(:disabled) {
  background: var(--bf-brand-hover) !important;
  border-color: var(--bf-brand-hover) !important;
  color: var(--bf-brand-contrast) !important;
}
.bf-theme .bf-step-btn:disabled,
.bf-theme .quantity-btn:disabled,
.bf-theme .party-counter-btn:disabled {
  background: #e5e7eb !important;
  border-color: #e5e7eb !important;
  color: var(--bf-muted-text) !important;
  cursor: not-allowed !important;
}

/* ── BUTTONS + LINKS ── */
.bf-theme .bf-btn-primary {
  background: var(--bf-brand) !important;
  border-color: var(--bf-brand) !important;
  color: var(--bf-brand-contrast) !important;
}
.bf-theme .bf-btn-primary:hover:not(:disabled) { background: var(--bf-brand-hover) !important; border-color: var(--bf-brand-hover) !important; }
.bf-theme .bf-btn-primary:disabled { background: #e5e7eb !important; color: var(--bf-muted-text) !important; cursor: not-allowed; }
.bf-theme .bf-btn-secondary,
.bf-theme .back-to-calendar {
  background: #ffffff !important;
  border: 1.5px solid var(--bf-brand-ink) !important;
  color: var(--bf-brand-ink) !important;
  font-weight: 600;
  cursor: pointer;
}
.bf-theme .bf-btn-secondary:hover,
.bf-theme .back-to-calendar:hover { background: var(--bf-muted-bg) !important; color: var(--bf-brand-ink) !important; }
.bf-theme .bf-link { color: var(--bf-brand-ink); }
.bf-theme .bf-link:hover { text-decoration: underline; }
.bf-theme .bf-text-brand { color: var(--bf-brand-ink); }
.bf-theme .bf-spinner { border-color: #e5e7eb; border-top-color: var(--bf-brand-ink); }
.bf-theme .bf-step-dot { background: var(--bf-brand); color: var(--bf-brand-contrast); }
.bf-theme .bf-step-bar { background: var(--bf-brand); }
