/* ═══════════════════════════════════════════════
   Booking Widget — Redesigned
   Clean, modern, card-based UI
   ═══════════════════════════════════════════════ */

/* ── Service Cards Grid ── */
.bw-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.bw-svc-card {
  background: var(--color-white, #fff);
  border: 2px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.bw-svc-card:hover {
  border-color: var(--color-primary, #4a6fa5);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.bw-svc-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.bw-svc-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text, #1a2233);
  margin-bottom: 4px;
}

.bw-svc-duration {
  font-size: 0.8rem;
  color: var(--color-text-muted, #6b7280);
}

/* ── Modal Overlay ── */
.bw-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(2px);
}

.bw-modal {
  background: var(--color-white, #fff);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}

.bw-modal-wide {
  max-width: 520px;
}

/* ── Modal Header ── */
.bw-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.bw-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text, #1a2233);
}

.bw-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-muted, #6b7280);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s;
  line-height: 1;
}

.bw-modal-close:hover {
  background: var(--color-surface, #f1f5f9);
}

/* ── Modal Body Sections ── */
.bw-modal-body {
  padding: 20px 24px;
}

.bw-modal-section {
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.bw-modal-section:last-child {
  border-bottom: none;
}

/* ── Calendar ── */
.bw-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.bw-cal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text, #1a2233);
}

.bw-nav-btn {
  background: var(--color-surface, #f1f5f9);
  border: 1px solid var(--color-border, #e2e8f0);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  color: var(--color-text, #1a2233);
}

.bw-nav-btn:hover {
  background: var(--color-border, #e2e8f0);
}

.bw-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.bw-weekday {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted, #6b7280);
  padding: 6px 0;
}

.bw-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.bw-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 10px;
  cursor: default;
  color: var(--color-text, #1a2233);
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.bw-day.bw-empty {
  visibility: hidden;
}

.bw-day.bw-past {
  color: var(--color-border, #d1d5db);
}

.bw-day.bw-closed {
  color: var(--color-border, #d1d5db);
  text-decoration: line-through;
}

.bw-day.bw-available {
  cursor: pointer;
  font-weight: 600;
}

.bw-day.bw-available:hover {
  background: var(--color-surface, #f1f5f9);
}

.bw-day.bw-selected {
  background: var(--color-primary, #4a6fa5) !important;
  color: #fff !important;
  font-weight: 700;
}

/* ── Time Slots ── */
.bw-slots-header {
  margin-bottom: 14px;
}

.bw-selected-date {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-primary, #4a6fa5);
}

.bw-slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bw-slot {
  background: var(--color-surface, #f1f5f9);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--color-text, #1a2233);
  font-family: inherit;
}

.bw-slot:hover {
  border-color: var(--color-primary, #4a6fa5);
  background: var(--color-white, #fff);
}

.bw-slot-selected {
  background: var(--color-primary, #4a6fa5) !important;
  color: #fff !important;
  border-color: var(--color-primary, #4a6fa5) !important;
}

.bw-slot-booked {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Radio Pills (tiers/durations) ── */
.bw-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bw-radio-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border: 2px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  flex: 1;
  min-width: 140px;
  font-size: 0.88rem;
}

.bw-radio-pill:hover {
  border-color: var(--color-primary, #4a6fa5);
}

.bw-radio-selected {
  border-color: var(--color-primary, #4a6fa5);
  background: rgba(74, 111, 165, 0.06);
}

.bw-radio-price {
  font-weight: 700;
  color: var(--color-primary, #4a6fa5);
}

/* ── Contact Form ── */
.bw-contact-section {
  padding-top: 20px;
}

.bw-field {
  margin-bottom: 16px;
}

.bw-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text, #1a2233);
  margin-bottom: 6px;
}

.bw-required {
  color: #ef4444;
}

.bw-field input,
.bw-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.15s;
  background: var(--color-white, #fff);
  color: var(--color-text, #1a2233);
}

.bw-field input:focus,
.bw-field textarea:focus {
  outline: none;
  border-color: var(--color-primary, #4a6fa5);
}

.bw-field textarea {
  resize: vertical;
  min-height: 72px;
}

.bw-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--color-text-muted, #6b7280);
}

.bw-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary, #4a6fa5);
}

/* ── Stepper ── */
.bw-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
}

.bw-stepper-btn {
  background: var(--color-surface, #f1f5f9);
  border: none;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  color: var(--color-text, #1a2233);
}

.bw-stepper-btn:hover:not(:disabled) {
  background: var(--color-border, #e2e8f0);
}

.bw-stepper-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.bw-stepper-value {
  min-width: 48px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text, #1a2233);
}

/* ── Submit Button ── */
.bw-submit {
  width: 100%;
  padding: 14px;
  background: var(--color-primary, #4a6fa5);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s;
  font-family: inherit;
  margin-top: 8px;
}

.bw-submit:hover {
  filter: brightness(1.1);
}

.bw-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Success State ── */
.bw-success {
  padding: 48px 32px;
  text-align: center;
}

.bw-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.bw-success h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--color-text, #1a2233);
}

.bw-success p {
  font-size: 0.95rem;
  color: var(--color-text-muted, #6b7280);
  line-height: 1.6;
  margin-bottom: 24px;
}

.bw-success-link {
  display: inline-block;
  background: var(--color-primary, #4a6fa5);
  color: #fff;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: filter 0.15s;
}

.bw-success-link:hover {
  filter: brightness(1.1);
}

/* ── Error Messages ── */
.bw-error {
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 4px;
  font-weight: 500;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .bw-modal-overlay {
    padding: 8px;
    align-items: flex-end;
  }

  .bw-modal {
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
  }

  .bw-services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bw-radio-pill {
    min-width: unset;
  }
}
