/* =============================================
   BP Booking Flow — Customer UI
   ============================================= */

/* ---- Buttons ---- */
.bp-btn,
.bp-booking-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.bp-btn:hover,
.bp-booking-trigger:hover {
  transform: translateY(-1px);
}

.bp-btn:disabled,
.bp-booking-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.bp-btn-primary,
.bp-booking-trigger {
  background: linear-gradient(135deg, #caa46a 0%, #b98946 100%);
  border-color: rgba(126, 90, 44, 0.22);
  color: #fff;
  box-shadow: 0 14px 28px rgba(126, 90, 44, 0.16);
}

.bp-btn-primary:hover,
.bp-booking-trigger:hover {
  box-shadow: 0 18px 34px rgba(126, 90, 44, 0.2);
}

.bp-btn-ghost {
  background: rgba(255,255,255,0.88);
  border-color: rgba(201,169,110,0.3);
  color: #5f4b34;
  box-shadow: 0 10px 24px rgba(42, 30, 18, 0.06);
}

.bp-btn-ghost:hover:not(:disabled) {
  background: #fff;
  border-color: rgba(185,137,70,0.45);
  box-shadow: 0 16px 28px rgba(42, 30, 18, 0.08);
}

/* ---- Overlay ---- */
.bp-booking-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  animation: bp-fadein 0.25s ease;
}

/* ---- Modal ---- */
.bp-booking-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: hidden;
}

/* ---- Header ---- */
.bp-booking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #f0ece6;
  background: #faf8f5;
  gap: 12px;
}

.bp-steps-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.bp-steps-indicator::-webkit-scrollbar { display: none; }

.bp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
  flex-shrink: 0;
}

.bp-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8e4df;
  color: #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.bp-step-label {
  font-size: 10px;
  font-weight: 600;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  transition: color 0.3s;
}

.bp-step.active .bp-step-dot {
  background: #c9a96e;
  color: #fff;
  box-shadow: 0 2px 10px rgba(201,169,110,0.4);
}
.bp-step.active .bp-step-label { color: #c9a96e; }

.bp-step.done .bp-step-dot {
  background: #27ae60;
  color: #fff;
}
.bp-step.done .bp-step-label { color: #27ae60; }

.bp-step-line {
  width: 24px;
  height: 2px;
  background: #e8e4df;
  flex-shrink: 0;
  margin-bottom: 14px;
  transition: background 0.3s;
}
.bp-step-line.done { background: #27ae60; }

.bp-booking-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #999;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s;
}

.bp-booking-close:hover { background: #f0ece6; color: #333; }

/* ---- Body ---- */
.bp-booking-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.bp-booking-step { display: none; }
.bp-booking-step.active {
  display: block;
  animation: bp-fadein 0.3s ease;
}

.bp-step-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px;
}

.bp-step-sub {
  font-size: 14px;
  color: #999;
  margin: 0 0 20px;
}

/* ---- Service Browser ---- */
.bp-category-block {
  margin-bottom: 24px;
}

.bp-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #faf8f5;
  border-radius: 10px;
  cursor: pointer;
  border: 1.5px solid #f0ece6;
  transition: all 0.2s;
  margin-bottom: 10px;
}

.bp-category-header:hover { border-color: #c9a96e; }

.bp-category-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #e8e4df;
}

.bp-category-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  flex: 1;
}

.bp-category-toggle {
  color: #c9a96e;
  font-size: 18px;
  transition: transform 0.2s;
}

.bp-category-block.open .bp-category-toggle { transform: rotate(180deg); }

.bp-services-wrap {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.35s ease, opacity 0.28s ease;
}

.bp-category-block.open .bp-services-wrap {
  grid-template-rows: 1fr;
  opacity: 1;
}

.bp-services-list {
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  padding: 4px 2px 2px;
}

.bp-service-card {
  border: 2px solid #f0ece6;
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  position: relative;
  background: linear-gradient(180deg, #fff 0%, #fcfaf7 100%);
  box-shadow: 0 10px 28px rgba(35, 27, 18, 0.05);
}

.bp-service-card:hover {
  border-color: #c9a96e;
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(35, 27, 18, 0.1);
}

.bp-service-card.selected {
  border-color: #c9a96e;
  background: rgba(201,169,110,0.06);
  box-shadow: 0 18px 36px rgba(201,169,110,0.14);
}

.bp-service-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 10px;
  color: #c9a96e;
  font-weight: 700;
  font-size: 16px;
}

.bp-service-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
  background: #e8e4df;
}

.bp-service-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.bp-service-meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 6px;
}

.bp-service-price {
  font-size: 15px;
  font-weight: 700;
  color: #c9a96e;
}

.bp-step-empty {
  padding: 18px 20px;
  border: 1px dashed rgba(201,169,110,0.45);
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  color: #7a6a58;
  font-size: 14px;
}

/* ---- Staff Browser ---- */
.bp-staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.bp-staff-card {
  border: 2px solid #f0ece6;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.bp-staff-card:hover { border-color: #c9a96e; transform: translateY(-2px); }

.bp-staff-card.selected {
  border-color: #c9a96e;
  background: rgba(201,169,110,0.06);
}

.bp-staff-card img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  display: block;
  background: #e8e4df;
}

.bp-staff-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.bp-staff-distance {
  font-size: 12px;
  color: #c9a96e;
  font-weight: 500;
}

/* ---- Time Browser ---- */
.bp-time-days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.bp-day-tab {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1.5px solid #f0ece6;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  min-width: 70px;
}

.bp-day-tab:hover { border-color: #c9a96e; }
.bp-day-tab.active { background: #c9a96e; color: #fff; border-color: #c9a96e; }
.bp-day-tab.off { opacity: 0.4; cursor: not-allowed; }

.bp-day-name { font-size: 11px; font-weight: 600; text-transform: uppercase; }
.bp-day-date { font-size: 14px; font-weight: 700; margin-top: 2px; }

.bp-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.bp-slot {
  padding: 10px 6px;
  border-radius: 8px;
  border: 1.5px solid #f0ece6;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: #333;
}

.bp-slot:hover:not(.booked) { border-color: #c9a96e; color: #c9a96e; }
.bp-slot.selected { background: #c9a96e; color: #fff; border-color: #c9a96e; }
.bp-slot.booked { background: #f5f5f5; color: #ccc; cursor: not-allowed; text-decoration: line-through; }

/* ---- Step 4: Form + Summary ---- */
.bp-booking-form-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.bp-booking-form {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(201,169,110,0.18);
  background: rgba(255,255,255,0.78);
  box-shadow: 0 16px 36px rgba(55, 40, 24, 0.05);
}

.bp-form-group {
  display: grid;
  gap: 8px;
}

.bp-form-group label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #5f4b34;
}

.bp-input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(201,169,110,0.22);
  background: #fff;
  color: #2b241d;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.bp-input::placeholder {
  color: #a59076;
}

.bp-input:focus {
  outline: none;
  border-color: rgba(185,137,70,0.7);
  box-shadow: 0 0 0 4px rgba(201,169,110,0.16);
}

textarea.bp-input {
  min-height: 110px;
  resize: vertical;
}

.bp-order-summary {
  background: #faf8f5;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #f0ece6;
  box-shadow: 0 16px 34px rgba(55, 40, 24, 0.05);
}

.bp-summary-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  margin-bottom: 14px;
}

.bp-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #555;
  padding: 6px 0;
  border-bottom: 1px solid #f0ece6;
}

.bp-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  padding-top: 12px;
  margin-top: 4px;
}

.bp-payment-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bp-pay-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #f0ece6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.bp-pay-option:hover { border-color: #c9a96e; }
.bp-pay-option.selected { border-color: #c9a96e; background: rgba(201,169,110,0.06); }
.bp-pay-option input { accent-color: #c9a96e; }

.bp-booking-inline {
  scroll-margin-top: 96px;
}

/* ---- Receipt ---- */
.bp-receipt {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.bp-receipt-icon {
  font-size: 56px;
  margin-bottom: 12px;
}

.bp-receipt h3 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 6px;
}

.bp-receipt-sub {
  color: #999;
  font-size: 14px;
  margin-bottom: 24px;
}

.bp-receipt-card {
  background: #faf8f5;
  border-radius: 12px;
  padding: 20px;
  text-align: left;
  margin-bottom: 20px;
  border: 1px solid #f0ece6;
}

.bp-receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #f0ece6;
  color: #555;
}

.bp-receipt-row:last-child { border-bottom: none; }
.bp-receipt-row strong { color: #1a1a2e; }

.bp-receipt-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ---- Footer ---- */
.bp-booking-footer {
  border-top: 1px solid #f0ece6;
  padding: 16px 24px;
  background: #faf8f5;
}

.bp-cart-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #555;
}

.bp-cart-total {
  font-size: 18px;
  font-weight: 700;
  color: #c9a96e;
}

.bp-nav-buttons,
.bp-booking-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.bp-nav-buttons .bp-btn,
.bp-booking-actions .bp-btn { flex: 1; justify-content: center; }

.bp-booking-actions {
  padding: 0 24px 20px;
  align-items: stretch;
}

.bp-booking-inline {
  margin-top: 24px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(201,169,110,0.12), transparent 34%),
    linear-gradient(180deg, #fffdf9 0%, #f8f3ec 100%);
  border: 1px solid rgba(201,169,110,0.18);
  box-shadow: 0 24px 64px rgba(55, 40, 24, 0.08);
  overflow: hidden;
}

.bp-inline-intro {
  padding: 28px 28px 0;
}

.bp-inline-title {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
  color: #1f1a17;
}

.bp-inline-subtitle {
  margin: 0;
  font-size: 15px;
  color: #7a6a58;
  max-width: 720px;
}

.bp-booking-inline .bp-booking-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.bp-booking-inline .bp-booking-header,
.bp-booking-inline .bp-booking-body,
.bp-booking-inline .bp-booking-actions,
.bp-booking-inline .bp-booking-footer {
  background: transparent;
}

.bp-booking-inline .bp-booking-header {
  padding: 20px 28px 16px;
}

.bp-booking-inline .bp-booking-body {
  padding: 8px 28px 20px;
}

.bp-booking-inline .bp-booking-actions {
  padding: 0 28px 22px;
}

.bp-booking-inline .bp-booking-footer {
  padding: 18px 28px 26px;
  border-top: 1px solid rgba(201,169,110,0.16);
}

.bp-booking-inline .bp-cart-bar {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(201,169,110,0.18);
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(10px);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .bp-booking-modal { max-height: 100vh; border-radius: 0; }
  .bp-booking-form-wrap { grid-template-columns: 1fr; }
  .bp-staff-grid { grid-template-columns: repeat(2, 1fr); }
  .bp-services-list { grid-template-columns: 1fr; }
  .bp-booking-inline .bp-booking-header,
  .bp-booking-inline .bp-booking-body,
  .bp-booking-inline .bp-booking-actions,
  .bp-booking-inline .bp-booking-footer,
  .bp-inline-intro { padding-left: 18px; padding-right: 18px; }
}

@keyframes bp-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
