/* ===== 3-step booking wizard (overlays existing form, no logic change) ===== */

body.has-booking-wizard .booking-workspace {
  display: block !important;
  grid-template-columns: none !important;
}
body.has-booking-wizard .smart-booking-form {
  display: block;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  max-width: none !important;
}
/* Original confirmation panel sits separately when shown */
body.has-booking-wizard .confirmation-panel:not([hidden]) {
  margin-top: 24px;
}

.bwiz {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.10));
  border: 1px solid rgba(232, 239, 244, 0.18);
  border-radius: 28px;
  padding: 32px;
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  position: relative;
}

/* Stepper */
.bwiz-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.bwiz-step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.bwiz-step:hover:not(.is-active) {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.18);
}
.bwiz-step-num {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-weight: 700;
  font-size: 0.85rem;
}
.bwiz-step.is-active {
  color: #1a1208;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold, #e3c881), var(--gold-dark, #9e8950));
  box-shadow: 0 10px 28px rgba(227, 200, 129, 0.35);
}
.bwiz-step.is-active .bwiz-step-num {
  background: rgba(26, 18, 8, 0.22);
  color: #1a1208;
}
.bwiz-step.is-done {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.06);
}
.bwiz-step.is-done .bwiz-step-num {
  background: rgba(74, 222, 128, 0.20);
  color: #4ade80;
  font-size: 0;
}
.bwiz-step.is-done .bwiz-step-num::before {
  content: '✓';
  font-size: 0.95rem;
  font-weight: 700;
}
.bwiz-step-sep {
  flex: 1;
  height: 2px;
  min-width: 16px;
  max-width: 60px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  border-radius: 2px;
}

/* Panels */
.bwiz-panels { position: relative; }
.bwiz-panel { display: none; }
.bwiz-panel.is-active {
  display: block;
  animation: bwizFade 0.35s ease both;
}
@keyframes bwizFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bwiz-panel-title {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}
.bwiz-panel-sub {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.95rem;
}

.bwiz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.bwiz-grid > * { min-width: 0; }

/* When the live price panel is moved inside step 2 */
.bwiz-panel .price-panel {
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 20px;
}

/* Step 3 summary card */
.bwiz-summary {
  margin: 0 0 20px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(227, 200, 129, 0.12), rgba(201, 168, 107, 0.08));
  border: 1px solid rgba(227, 200, 129, 0.28);
}
.bwiz-summary-title {
  margin: 0 0 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}
.bwiz-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}
.bwiz-summary-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.bwiz-summary-row dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.50);
  font-weight: 600;
}
.bwiz-summary-row dd {
  margin: 0;
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Navigation */
.bwiz-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.bwiz-spacer { flex: 1; }
.bwiz-btn {
  appearance: none;
  border: none;
  padding: 14px 28px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}
.bwiz-back {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.bwiz-back:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.bwiz-next,
.bwiz-submit {
  background: linear-gradient(135deg, var(--gold, #e3c881), var(--gold-dark, #9e8950));
  color: #fff;
  box-shadow: 0 12px 32px rgba(227, 200, 129, 0.45);
}
.bwiz-next:hover,
.bwiz-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(227, 200, 129, 0.60);
}
.bwiz-btn[hidden],
.bwiz-step[hidden],
.bwiz [hidden] { display: none !important; }
.bwiz-next:disabled,
.bwiz-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Hide the original submit input — wizard provides its own */
.smart-booking-form > input[type="submit"] {
  display: none !important;
}

body.has-booking-wizard .booking-time-hidden,
body.has-booking-wizard .booking-source-date,
body.has-booking-wizard .booking-source-time {
  display: none !important;
}

.booking-datetime-field { position: relative; }
.booking-datetime-ui { position: relative; }
.booking-datetime-combo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
}
.booking-datetime-combo input {
  height: 46px !important;
  min-height: 46px !important;
  width: 100% !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  font-size: 0.94rem !important;
  line-height: 46px !important;
}
.booking-datetime-combo button,
.bdt-head button,
.bdt-now,
.bdt-ok {
  appearance: none;
  border: 1px solid rgba(227, 200, 129, 0.34);
  background: rgba(227, 200, 129, 0.14);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  cursor: pointer;
}
.booking-datetime-combo button { height: 46px; font-size: 1rem; }
.booking-datetime-popup {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  width: min(100vw - 36px, 430px);
}
.bdt-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(227, 200, 129, 0.34);
  border-radius: 16px;
  background: rgba(26, 32, 38, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
}
.bdt-head { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; gap: 6px; margin-bottom: 8px; }
.bdt-head strong { text-align: center; color: rgba(255,255,255,0.92); font-size: 0.9rem; }
.bdt-head button { height: 30px; }
.bdt-week,
.bdt-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bdt-week span { text-align: center; font-size: 0.66rem; color: rgba(255,255,255,0.48); }
.bdt-empty,
.bdt-day {
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}
.bdt-day {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
}
.bdt-day.is-selected {
  background: linear-gradient(135deg, var(--gold, #e3c881), var(--gold-dark, #9e8950));
  color: #1a1208;
  border-color: transparent;
  font-weight: 700;
}
.bdt-time { display: flex; flex-direction: column; gap: 9px; }
.bdt-time span { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(227, 200, 129, 0.9); }
.bdt-time div { display: grid; grid-template-columns: 1fr 8px 1fr; align-items: center; gap: 5px; }
.bdt-time select {
  min-width: 0;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: #fff;
  padding: 0 6px;
  font-size: 0.86rem;
}
.bdt-time b { color: rgba(255,255,255,0.75); }
.bdt-now,
.bdt-ok { min-height: 34px; font-weight: 700; }
.bdt-ok { background: linear-gradient(135deg, var(--gold, #e3c881), var(--gold-dark, #9e8950)); color: #1a1208; }

/* AI shortcut card on step 1 */
.bwiz-ai-shortcut {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(227, 200, 129, 0.10), rgba(201, 168, 107, 0.06));
  border: 1px dashed rgba(227, 200, 129, 0.38);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.bwiz-ai-shortcut:hover {
  background: linear-gradient(135deg, rgba(227, 200, 129, 0.18), rgba(201, 168, 107, 0.10));
  border-color: rgba(227, 200, 129, 0.55);
}
.bwiz-ai-shortcut-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.bwiz-ai-shortcut-text {
  flex: 1;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}
.bwiz-ai-shortcut-text strong {
  display: block;
  color: #fff;
  margin-bottom: 2px;
}
.bwiz-ai-shortcut[aria-expanded="false"] ~ .upload-panel {
  display: none;
}

/* Mobile */
@media (max-width: 768px) {
  .bwiz { padding: 20px; border-radius: 22px; }
  .bwiz-stepper { gap: 6px; margin-bottom: 22px; padding-bottom: 18px; }
  .bwiz-step { padding: 8px 10px; font-size: 0.82rem; }
  .bwiz-step-label { display: none; }
  .bwiz-step.is-active .bwiz-step-label { display: inline; }
  .bwiz-step-sep { min-width: 8px; }
  .bwiz-grid,
  .bwiz-summary-grid { grid-template-columns: 1fr; }
  .booking-datetime-combo { grid-template-columns: minmax(0, 1fr) 40px; }
  .booking-datetime-combo input,
  .booking-datetime-combo button { height: 44px !important; min-height: 44px !important; font-size: 0.92rem !important; }
  .booking-datetime-popup { width: min(100vw - 32px, 360px); }
  .bdt-card { grid-template-columns: 1fr; gap: 10px; }
  .bdt-time { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; }
  .bwiz-btn { padding: 12px 20px; font-size: 0.9rem; }
  .bwiz-nav {
    position: sticky;
    bottom: 12px;
    margin: 28px -8px 0;
    padding: 14px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    border-top: none;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.30);
  }
}
