/* =============================================
   Booking Widget Styles
   ============================================= */

/* ── Wrapper ── */
.bw-wrap,
.bw-manage-wrap {
  max-width: 700px;
  margin: 0 auto;
}

/* ── Progress bar ── */
.bw-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.bw-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 70px;
}

.bw-step-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dde3e8;
  color: #aaa;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, color 0.25s;
}

.bw-step span {
  font-size: 0.7rem;
  color: #aaa;
  text-align: center;
  font-weight: 600;
  transition: color 0.25s;
}

.bw-step.active .bw-step-dot {
  background: var(--brand-dark);
  color: var(--white);
}

.bw-step.active span {
  color: var(--brand-dark);
}

.bw-step.done .bw-step-dot {
  background: var(--brand-accent);
  color: var(--brand-dark);
}

.bw-step.done span {
  color: var(--brand-accent);
}

.bw-step-line {
  width: 40px;
  height: 2px;
  background: #dde3e8;
  margin-bottom: 22px;
  flex-shrink: 0;
}

/* ── Step title ── */
.bw-step-title {
  font-size: 1.3rem;
  color: var(--brand-dark);
  margin-bottom: 1.5rem;
}

/* ── Service selection ── */
.bw-services {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.bw-service-btn {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid #dde3e8;
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  width: 100%;
}

.bw-service-btn:hover {
  border-color: var(--brand-mid);
  background: var(--brand-light);
}

.bw-service-btn.selected {
  border-color: var(--brand-accent);
  background: rgba(200,169,110,0.08);
  box-shadow: 0 0 0 3px rgba(200,169,110,0.2);
}

.bw-svc-emoji {
  font-size: 1.6rem;
  line-height: 1;
  margin-top: 2px;
  flex-shrink: 0;
}

.bw-svc-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.bw-svc-info strong {
  font-size: 1rem;
  color: var(--brand-dark);
}

.bw-svc-info span {
  font-size: 0.85rem;
  color: var(--text-light);
}

.bw-svc-desc {
  font-size: 0.8rem !important;
  color: var(--text-light) !important;
  margin-top: 0.1rem;
}

/* ── Date & time ── */
.bw-datetime-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.bw-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
}

.bw-date-input {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #dde3e8;
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-dark);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  max-width: 240px;
}

.bw-date-input:focus {
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(42,96,112,0.12);
}

.bw-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.bw-no-slots {
  font-size: 0.9rem;
  color: var(--text-light);
  background: var(--brand-light);
  padding: 1rem;
  border-radius: var(--radius);
}

.bw-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bw-slots-sm .bw-slot {
  min-width: 70px;
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
}

.bw-slot {
  padding: 0.4rem 0.75rem;
  min-width: 76px;
  border: 1.5px solid #dde3e8;
  border-radius: 6px;
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-dark);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.bw-slot:hover:not(:disabled) {
  border-color: var(--brand-mid);
  background: var(--brand-light);
}

.bw-slot.selected {
  border-color: var(--brand-accent);
  background: rgba(200,169,110,0.15);
  color: var(--brand-dark);
}

.bw-slot.unavailable {
  background: #f4f4f4;
  color: #ccc;
  border-color: #eee;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ── Details form ── */
.bw-form {
  margin-bottom: 1.5rem;
}

.bw-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.bw-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  min-width: 0; /* let grid columns shrink below the input's intrinsic width */
}

.bw-form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.bw-form-group input[type="text"],
.bw-form-group input[type="email"],
.bw-form-group input[type="tel"],
.bw-form-group input[type="date"],
.bw-form-group input[type="password"],
.bw-form-group textarea,
.bw-form-group select {
  width: 100%;
  min-width: 0;
  border: 1.5px solid #dde3e8;
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  color: var(--text-dark);
  font-family: inherit;
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bw-form-group input:focus,
.bw-form-group textarea:focus,
.bw-form-group select:focus {
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(42,96,112,0.12);
}

.bw-form-group textarea { resize: vertical; }

.bw-checkbox label {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
}

.bw-checkbox input[type="checkbox"] {
  accent-color: var(--brand-accent);
  width: auto;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ── Summary ── */
.bw-summary {
  background: var(--brand-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.bw-summary-cancelled { opacity: 0.65; }

.bw-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  gap: 1rem;
}

.bw-summary-row:last-child { border-bottom: none; }

.bw-summary-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.bw-summary-value {
  font-size: 0.92rem;
  color: var(--brand-dark);
  font-weight: 500;
  text-align: right;
}

.bw-price { font-size: 1.1rem !important; font-weight: 700 !important; color: var(--brand-accent) !important; }

.bw-summary-divider {
  border-top: 2px solid rgba(0,0,0,0.08);
  margin: 0.5rem 0;
}

.bw-ref {
  display: inline-block;
  background: var(--brand-dark);
  color: var(--white);
  font-family: monospace;
  font-size: 1.25rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  letter-spacing: 0.1em;
  margin: 0.5rem 0 1.25rem;
}

.bw-ref-inline {
  font-family: monospace;
  font-size: 0.95rem;
  background: rgba(0,0,0,0.06);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.bw-policy-note {
  font-size: 0.85rem;
  color: var(--text-light);
  background: #fff8ed;
  border-left: 3px solid var(--brand-accent);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.5rem;
}

/* ── Done state ── */
.bw-done {
  text-align: center;
  padding: 2rem 1rem;
}

.bw-done-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.bw-done h3  { font-size: 1.6rem; margin-bottom: 0.5rem; }
.bw-done p   { color: var(--text-mid); }

.bw-done-details {
  background: var(--brand-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem auto;
  max-width: 360px;
}

.bw-done-details p { margin-bottom: 0.25rem; font-weight: 500; color: var(--brand-dark); }

.bw-done-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ── Manage section ── */
.bw-manage-actions {
  margin-top: 1.25rem;
}

.btn-cancel {
  background: transparent;
  border: 2px solid #e05252;
  color: #e05252;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-cancel:hover { background: #fff0f0; }

.btn-outline-dark {
  background: transparent;
  border: 2px solid var(--brand-dark);
  color: var(--brand-dark);
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-outline-dark:hover { background: var(--brand-light); }

.bw-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bw-status-confirmed { background: #e6f4ea; color: #2e7d32; }
.bw-status-cancelled { background: #fce8e8; color: #c62828; }

.bw-cancelled-note {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 1rem;
}

.bw-reschedule-form {
  background: var(--brand-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.25rem;
}

.bw-reschedule-form h4 { margin-bottom: 1rem; font-size: 1rem; }

/* ── Errors ── */
.bw-error-list {
  background: #fce8e8;
  border-left: 3px solid #e05252;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.bw-error-list p {
  font-size: 0.85rem;
  color: #c62828;
  margin-bottom: 0.25rem;
}

.bw-error-list p:last-child { margin-bottom: 0; }

/* ── Actions ── */
.bw-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Disabled btn */
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Optional label ── */
.bw-optional {
  font-weight: 400;
  color: var(--text-light);
  font-size: 0.78rem;
}

/* ── Practitioner selection ── */
.bw-prac-intro {
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
}

.bw-practitioners {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.bw-practitioner-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid #dde3e8;
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  width: 100%;
}

.bw-practitioner-card:hover {
  border-color: var(--brand-mid);
  background: var(--brand-light);
}

.bw-practitioner-card.selected {
  border-color: var(--brand-accent);
  background: rgba(200,169,110,0.08);
  box-shadow: 0 0 0 3px rgba(200,169,110,0.2);
}

.bw-prac-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.bw-prac-avatar--male   { background: #ddeeff; }
.bw-prac-avatar--female { background: #fde8f5; }
.bw-prac-avatar--any,
.bw-prac-avatar--prefer_not_to_say { background: #eef2f5; }

.bw-prac-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.bw-prac-info strong {
  font-size: 1rem;
  color: var(--brand-dark);
}

.bw-prac-note {
  font-size: 0.82rem;
  color: var(--text-light);
}

.bw-prac-gender-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  display: inline-block;
  width: fit-content;
}

.bw-prac-gender--male   { background: #ddeeff; color: #1a5276; }
.bw-prac-gender--female { background: #fde8f5; color: #7d1f5c; }
.bw-prac-gender--any,
.bw-prac-gender--prefer_not_to_say { background: #eef2f5; color: var(--text-mid); }

.bw-prac-recommended {
  font-size: 0.75rem;
  font-weight: 600;
  color: #2e7d32;
}

/* ── Deposit box ── */
.bw-deposit-box {
  background: #fef9f0;
  border: 2px solid #f4c36a;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.bw-deposit-header {
  font-weight: 700;
  font-size: 0.95rem;
  color: #7a4d00;
  margin-bottom: 0.75rem;
}

.bw-deposit-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
  padding: 0.3rem 0;
  color: #5a3900;
}

.bw-deposit-row strong {
  font-size: 1.05rem;
  color: #3d2200;
}

.bw-deposit-balance {
  font-size: 0.82rem;
  color: #9a7040;
  border-top: 1px solid #f0d8a0;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
}

.bw-deposit-note {
  font-size: 0.82rem;
  color: #7a5a20;
  margin-top: 0.75rem;
  background: #fff8e1;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}

/* ── Stripe card element ── */
.bw-stripe-section {
  margin-bottom: 1.5rem;
}

.bw-stripe-card-element {
  border: 2px solid #dde3e8;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background: var(--white);
  transition: border-color 0.2s;
}

.bw-stripe-card-element.StripeElement--focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(200,169,110,0.2);
  outline: none;
}

.bw-stripe-card-element.StripeElement--invalid {
  border-color: #e05252;
}

.bw-stripe-error {
  font-size: 0.84rem;
  color: #c62828;
  margin-top: 0.4rem;
}

.bw-stripe-secure {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.6rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .bw-form-row { grid-template-columns: 1fr; }

  .bw-progress { gap: 0.1rem; }
  .bw-step { min-width: 48px; }
  .bw-step span { font-size: 0.58rem; }
  .bw-step-line { width: 14px; }

  .bw-actions { flex-direction: column; align-items: stretch; }
  .bw-actions .btn { justify-content: center; }
  .bw-done-actions { flex-direction: column; }
}

/* ── Deposit payment step ── */
.bw-deposit-row .bw-summary-label { font-weight: 700; color: var(--brand-accent); }
.bw-deposit-row .bw-summary-value { color: var(--brand-accent); }

.bw-payment-element {
  background: var(--bone, #f7f9f9);
  border: 1px solid var(--line, rgba(0,0,0,0.1));
  border-radius: 14px;
  padding: 1.1rem;
  min-height: 220px;
}

.bw-deposit-confirmed {
  background: #e2f1f1;
  color: #1f6b6d;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  margin-top: 0.6rem;
}

/* ── Pay choice (deposit vs full) ── */
.bw-pay-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--line, rgba(0,0,0,0.12));
  border-radius: 12px;
  margin-bottom: 0.55rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.bw-pay-choice.selected {
  border-color: var(--brand-accent, #3a8a8d);
  background: rgba(58, 138, 141, 0.06);
}
.bw-pay-choice input { margin-top: 0.2rem; accent-color: var(--brand-accent, #3a8a8d); }
