/* ============================================
   adverr® — Booking Modal
   ============================================ */

/* ── Overlay ─────────────────────────────────────────────────── */
.bm-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease, cubic-bezier(.2,.8,.2,1));
}
.bm-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Modal — mobile: bottom sheet, desktop: centered dialog ──── */
.bm-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8100;
  max-height: 94svh;
  background: var(--bg-paper, #F5F1E8);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -12px 60px rgba(10,10,10,0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
  transition: transform .35s var(--ease, cubic-bezier(.2,.8,.2,1)), opacity .25s var(--ease, cubic-bezier(.2,.8,.2,1));
}
.bm-modal.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 600px) {
  .bm-modal {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: min(860px, calc(100% - 32px));
    border-radius: 20px;
    transform: translate(-50%, calc(-50% + 24px));
    max-height: 90svh;
  }
  .bm-modal.is-open {
    transform: translate(-50%, -50%);
  }
}

/* ── Header ──────────────────────────────────────────────────── */
.bm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 28px 0;
  flex-shrink: 0;
}
.bm-title {
  font-family: var(--f-display, "Archivo Black", sans-serif);
  font-size: clamp(22px, 4vw, 30px);
  letter-spacing: -0.02em;
  color: var(--ink, #0a0a0a);
  margin: 0 0 4px;
}
.bm-sub {
  font-size: 13.5px;
  color: var(--ink-muted, #3a3530);
  margin: 0;
}
.bm-close {
  background: var(--bg-soft, #e8e1d2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 16px;
  transition: background .15s;
  color: var(--ink-soft, #1a1a1a);
}
.bm-close:hover { filter: brightness(.9); }

/* ── Body ────────────────────────────────────────────────────── */
.bm-body {
  overflow-y: auto;
  padding: 20px 28px 32px;
  flex: 1;
}

/* ── Form fields ─────────────────────────────────────────────── */
.bm-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 24px;
}
.bm-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 480px) {
  .bm-field-row { grid-template-columns: 1fr; }
}

.bm-body .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.bm-body .field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted, #3a3530);
}
.bm-body .field input {
  width: 100%;
  font-family: var(--f-body, "Manrope", sans-serif);
  font-size: 15px;
  color: var(--ink, #0a0a0a);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(10,10,10,0.2);
  border-radius: 0;
  padding: 10px 0;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
  box-sizing: border-box;
}
.bm-body .field input:focus { border-color: var(--ink, #0a0a0a); }

/* ── Calendar wrap ───────────────────────────────────────────── */
.bm-calendar-wrap {
  margin-bottom: 20px;
}

/* ── Calendar navigation ─────────────────────────────────────── */
.bm-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0 2px;
}
.bm-nav-btn {
  background: var(--bg-soft, #e8e1d2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink, #0a0a0a);
  flex-shrink: 0;
  transition: background .15s, opacity .15s;
}
.bm-nav-btn:hover:not(:disabled) { background: var(--gold-light, #d9b265); }
.bm-nav-btn:disabled { opacity: .3; cursor: not-allowed; }
.bm-week-label {
  font-family: var(--f-body, "Manrope", sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted, #3a3530);
  text-align: center;
  flex: 1;
}

/* ── Calendar grid ───────────────────────────────────────────── */
.bm-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

/* ── Day column ──────────────────────────────────────────────── */
.bm-day {
  min-width: 90px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bm-day--past {
  opacity: .35;
  pointer-events: none;
}
.bm-day--today .bm-day__head {
  background: rgba(184, 146, 74, 0.1);
  border-radius: 8px;
  padding: 6px 4px;
  margin: -6px -4px 0;
}
.bm-day__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
  padding: 6px 4px;
}
.bm-day__name {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-muted, #3a3530);
}
.bm-day__date {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft, #1a1a1a);
}
.bm-day__slots {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ── Slot buttons ────────────────────────────────────────────── */
.bm-slot {
  width: 100%;
  padding: 6px 4px;
  background: var(--bg-cream, #f1ebe0);
  border: 1.5px solid rgba(10,10,10,0.12);
  border-radius: 8px;
  font-family: var(--f-body, "Manrope", sans-serif);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink, #0a0a0a);
  cursor: pointer;
  text-align: center;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  white-space: nowrap;
}
.bm-slot:hover:not(:disabled):not(.bm-slot--selected) {
  background: var(--bg-soft, #e8e1d2);
  border-color: var(--gold, #b8924a);
  transform: translateY(-1px);
}
.bm-slot--selected {
  background: var(--gold, #b8924a);
  border-color: var(--gold, #b8924a);
  color: #fff;
  transform: translateY(-1px);
}
.bm-slot[disabled] {
  opacity: .3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── No slots / loading ──────────────────────────────────────── */
.bm-no-slots {
  font-size: 12px;
  color: var(--ink-muted, #3a3530);
  text-align: center;
  padding: 8px 0;
  opacity: .5;
}
.bm-cal-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 0;
  font-size: 13px;
  color: var(--ink-muted, #3a3530);
}

/* ── Selected slot info ──────────────────────────────────────── */
.bm-selected-info {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-deep, #8c6a2e);
  background: rgba(184, 146, 74, 0.1);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  text-align: center;
}

/* ── Submit button ───────────────────────────────────────────── */
#bm-form .btn--submit {
  width: 100%;
  padding: 18px;
  font-family: var(--f-display, "Archivo Black", sans-serif);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ink, #0a0a0a);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 8px;
  transition: background .2s, transform .1s;
}
#bm-form .btn--submit:hover:not(:disabled) { background: var(--gold-deep, #8c6a2e); }
#bm-form .btn--submit:active { transform: translateY(1px); }
#bm-form .btn--submit:disabled { opacity: .65; cursor: wait; }

/* ── Success message ─────────────────────────────────────────── */
.bm-success {
  margin-top: 20px;
  padding: 24px 28px;
  background: color-mix(in srgb, var(--gold, #b8860b) 10%, #fff);
  border: 2px solid var(--gold, #b8860b);
  border-radius: 14px;
  text-align: center;
  animation: bm-fadein .35s ease;
}
@keyframes bm-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bm-success__icon {
  width: 52px; height: 52px;
  background: var(--gold, #b8860b); color: #fff;
  border-radius: 50%; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.bm-success__title {
  font-size: 18px; font-weight: 700;
  color: var(--ink, #1a1612); margin: 0 0 10px;
  line-height: 1.3;
}
.bm-success__sub {
  font-size: 15px; font-weight: 600;
  color: var(--gold-deep, #8c6a2e);
  margin: 0; line-height: 1.5;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--gold, #b8860b) 15%, #fff);
  border-radius: 8px;
}

/* ── Form note ───────────────────────────────────────────────── */
#bm-form .form-note {
  font-size: 12px;
  color: var(--ink-muted, #3a3530);
  text-align: center;
  margin: 14px 0 0;
}

/* ── Responsive: ≤600px ──────────────────────────────────────── */
@media (max-width: 600px) {
  .bm-header { padding: 20px 20px 0; }
  .bm-body { padding: 16px 20px 28px; }
  .bm-cal-grid {
    grid-template-columns: repeat(7, minmax(90px, 1fr));
    overflow-x: auto;
  }
}
