/* ============================================================
   PARAPPAT DENTAL CLINIC — Booking Wizard Modal Styles
   Matches heritage clinical aesthetic: --dark, --gold, Cormorant
   ============================================================ */

/* ── Overlay ──────────────────────────────────────────────── */
.bm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(12, 27, 51, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.bm-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Panel ────────────────────────────────────────────────── */
.bm-panel {
  background: #0F223D;
  border: 1px solid rgba(167, 138, 90, 0.25);
  border-radius: 16px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(167, 138, 90, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  outline: none;
}
.bm-overlay.is-open .bm-panel {
  transform: translateY(0) scale(1);
}

/* ── Header ───────────────────────────────────────────────── */
.bm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 18px;
  border-bottom: 1px solid rgba(167, 138, 90, 0.15);
  flex-shrink: 0;
}
.bm-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bm-header__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #A78A5A;
  box-shadow: 0 0 8px rgba(167, 138, 90, 0.5);
}
.bm-header__label {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #A78A5A;
}
.bm-close {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #8e9aaf;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  line-height: 0;
}
.bm-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* ── Progress ─────────────────────────────────────────────── */
.bm-progress {
  padding: 16px 24px 0;
  flex-shrink: 0;
}
.bm-progress__track {
  height: 3px;
  background: rgba(167, 138, 90, 0.15);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 12px;
}
.bm-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #8E744A, #A78A5A, #C0A068);
  border-radius: 99px;
  transition: width 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 0%;
}
.bm-progress__steps {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.bm-progress__dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(167, 138, 90, 0.3);
  color: #5a6270;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}
.bm-progress__dot.active {
  border-color: #A78A5A;
  color: #A78A5A;
  background: rgba(167, 138, 90, 0.1);
  box-shadow: 0 0 0 3px rgba(167, 138, 90, 0.15);
}
.bm-progress__dot.done {
  border-color: #A78A5A;
  background: #A78A5A;
  color: #0C1B33;
}

/* ── Steps container ──────────────────────────────────────── */
.bm-steps {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 138, 90, 0.2) transparent;
}
.bm-steps::-webkit-scrollbar { width: 4px; }
.bm-steps::-webkit-scrollbar-track { background: transparent; }
.bm-steps::-webkit-scrollbar-thumb { background: rgba(167, 138, 90, 0.25); border-radius: 99px; }

.bm-step__eyebrow {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(167, 138, 90, 0.7);
  margin-bottom: 6px;
}
.bm-step__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: #FAF9F6;
  line-height: 1.2;
  margin-bottom: 6px;
}
.bm-step__sub {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: #7a8599;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ── Step 1 — Treatment grid ──────────────────────────────── */
.bm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 420px) {
  .bm-grid { grid-template-columns: repeat(2, 1fr); }
}
.bm-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(167, 138, 90, 0.15);
  border-radius: 10px;
  padding: 12px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.bm-tile:hover {
  background: rgba(167, 138, 90, 0.08);
  border-color: rgba(167, 138, 90, 0.4);
  transform: translateY(-1px);
}
.bm-tile.is-selected {
  background: rgba(167, 138, 90, 0.14);
  border-color: #A78A5A;
  box-shadow: 0 0 0 2px rgba(167, 138, 90, 0.2), 0 4px 16px rgba(167, 138, 90, 0.15);
}
.bm-tile__icon {
  font-size: 22px;
  line-height: 1;
}
.bm-tile__label {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #c8d0de;
  line-height: 1.3;
}
.bm-tile.is-selected .bm-tile__label {
  color: #A78A5A;
}

/* ── Step 2 — Date grid ───────────────────────────────────── */
.bm-date-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  margin-bottom: 20px;
}
.bm-date-grid::-webkit-scrollbar { display: none; }
.bm-date-tile {
  flex-shrink: 0;
  min-width: 60px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(167, 138, 90, 0.15);
  border-radius: 10px;
  padding: 10px 8px;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.2s ease;
}
.bm-date-tile:hover {
  border-color: rgba(167, 138, 90, 0.4);
  background: rgba(167, 138, 90, 0.07);
}
.bm-date-tile.is-selected {
  background: rgba(167, 138, 90, 0.16);
  border-color: #A78A5A;
  box-shadow: 0 0 0 2px rgba(167, 138, 90, 0.2);
}
.bm-date-tile__day {
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a8599;
}
.bm-date-tile.is-selected .bm-date-tile__day { color: rgba(167, 138, 90, 0.8); }
.bm-date-tile__num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: #FAF9F6;
  line-height: 1;
}
.bm-date-tile.is-selected .bm-date-tile__num { color: #A78A5A; }
.bm-date-tile__month {
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  color: #5a6270;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bm-date-tile.is-selected .bm-date-tile__month { color: rgba(167, 138, 90, 0.7); }

/* Time slots */
.bm-time-section {
  border-top: 1px solid rgba(167, 138, 90, 0.12);
  padding-top: 16px;
}
.bm-time-section__label {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #A78A5A;
  margin-bottom: 12px;
}
.bm-time-group {
  margin-bottom: 14px;
}
.bm-time-group__period {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  color: #5a6270;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 6px;
}
.bm-time-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bm-time-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(167, 138, 90, 0.15);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #c8d0de;
  cursor: pointer;
  transition: all 0.18s ease;
}
.bm-time-chip:hover {
  border-color: rgba(167, 138, 90, 0.4);
  background: rgba(167, 138, 90, 0.07);
  color: #FAF9F6;
}
.bm-time-chip.is-selected {
  background: rgba(167, 138, 90, 0.18);
  border-color: #A78A5A;
  color: #A78A5A;
  box-shadow: 0 0 0 2px rgba(167, 138, 90, 0.15);
}

/* ── Step 3 — Form ────────────────────────────────────────── */
.bm-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bm-label {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #c8d0de;
  letter-spacing: 0.04em;
}
.bm-required { color: #A78A5A; }
.bm-optional { color: #5a6270; font-weight: 400; }
.bm-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(167, 138, 90, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #FAF9F6;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  caret-color: #A78A5A;
}
.bm-input::placeholder { color: #3d4a5c; }
.bm-input:focus {
  border-color: #A78A5A;
  box-shadow: 0 0 0 3px rgba(167, 138, 90, 0.12);
  background: rgba(167, 138, 90, 0.05);
}
.bm-textarea { resize: none; }
.bm-phone-wrap {
  display: flex;
  align-items: center;
  gap: 0;
}
.bm-phone-prefix {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(167, 138, 90, 0.2);
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 12px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: #7a8599;
  white-space: nowrap;
  flex-shrink: 0;
}
.bm-input--phone {
  border-radius: 0 8px 8px 0;
  flex: 1;
}

/* ── Step 4 — Summary ─────────────────────────────────────── */
.bm-summary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(167, 138, 90, 0.15);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.bm-summary__row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(167, 138, 90, 0.08);
}
.bm-summary__row:last-child { border-bottom: none; }
.bm-summary__icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.bm-summary__key {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(167, 138, 90, 0.7);
  margin-bottom: 2px;
}
.bm-summary__val {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #FAF9F6;
  font-weight: 400;
}
.bm-wa-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(37, 211, 102, 0.06);
  border: 1px solid rgba(37, 211, 102, 0.15);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  color: #7a8599;
  line-height: 1.5;
}
.bm-wa-disclaimer svg {
  fill: #25D366;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Footer / Nav buttons ─────────────────────────────────── */
.bm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(167, 138, 90, 0.1);
  flex-shrink: 0;
  gap: 12px;
}
.bm-btn {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 12px 24px;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bm-btn--ghost {
  background: transparent;
  color: #5a6270;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
}
.bm-btn--ghost:hover {
  color: #FAF9F6;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}
.bm-btn--gold {
  background: #A78A5A;
  color: #0C1B33;
  flex: 1;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(167, 138, 90, 0.3);
}
.bm-btn--gold:hover {
  background: #C0A068;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(167, 138, 90, 0.4);
}
.bm-btn--gold:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(167, 138, 90, 0.25);
}
.bm-btn--whatsapp {
  background: #25D366 !important;
  color: #ffffff !important;
  flex: 1;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3) !important;
}
.bm-btn--whatsapp:hover {
  background: #1fba58 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.4) !important;
}

/* ── Error message ────────────────────────────────────────── */
.bm-error {
  margin: 0 24px;
  padding: 10px 14px;
  background: rgba(220, 60, 60, 0.12);
  border: 1px solid rgba(220, 60, 60, 0.3);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: #ff8080;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.bm-error.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile adjustments ───────────────────────────────────── */
@media (max-width: 540px) {
  .bm-overlay { padding: 0; align-items: flex-end; }
  .bm-panel {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    transform: translateY(40px);
  }
  .bm-overlay.is-open .bm-panel { transform: translateY(0); }
  .bm-step__title { font-size: 22px; }
  .bm-footer { padding: 12px 16px 24px; }
  .bm-steps { padding: 16px; }
  .bm-header { padding: 16px; }
  .bm-progress { padding: 12px 16px 0; }
}
