/* ============================================================
   M. Jacob Company — Booking Modal
   Dark theme, matches style.css variables
   ============================================================ */

/* Overlay */
.booking-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: bk-fade-in 0.2s ease;
}
.booking-overlay.active {
  display: flex;
}
@keyframes bk-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Modal shell */
.booking-modal {
  background: #111118;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: bk-slide-up 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
@keyframes bk-slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Close button */
.booking-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.06);
  border: none;
  color: rgba(245,245,247,0.6);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  z-index: 10;
}
.booking-close:hover {
  background: rgba(255,255,255,0.12);
  color: #f5f5f7;
}

/* Header */
.booking-header {
  padding: 2rem 2rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.booking-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #f5f5f7;
  margin-bottom: 0.25rem;
}
.booking-header p {
  font-size: 0.9rem;
  color: rgba(245,245,247,0.55);
}

/* Path chooser */
.booking-paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
}
.booking-path-btn {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  color: #f5f5f7;
}
.booking-path-btn:hover {
  border-color: rgba(59,130,246,0.5);
  background: rgba(59,130,246,0.08);
}
.booking-path-btn .path-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}
.booking-path-btn .path-title {
  font-size: 0.95rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}
.booking-path-btn .path-desc {
  font-size: 0.78rem;
  color: rgba(245,245,247,0.5);
  display: block;
}

/* Step content */
.booking-body {
  padding: 0 2rem 2rem;
}

/* Step header with back button */
.step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 1.25rem;
}
.step-back {
  background: none;
  border: none;
  color: rgba(245,245,247,0.5);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: all 0.15s;
  line-height: 1;
}
.step-back:hover {
  color: #f5f5f7;
  background: rgba(255,255,255,0.06);
}
.step-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #f5f5f7;
}

/* ---- Calendar ---- */
.bk-calendar {
  user-select: none;
}
.bk-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.bk-cal-nav button {
  background: rgba(255,255,255,0.06);
  border: none;
  color: #f5f5f7;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s;
}
.bk-cal-nav button:hover { background: rgba(255,255,255,0.12); }
.bk-cal-nav button:disabled { opacity: 0.3; cursor: default; }
.bk-cal-month {
  font-weight: 600;
  font-size: 0.95rem;
  color: #f5f5f7;
}
.bk-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.bk-cal-dow {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(245,245,247,0.4);
  padding: 0.4rem 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bk-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s;
  color: #f5f5f7;
  background: transparent;
  border: none;
}
.bk-cal-day:hover:not(:disabled) {
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
}
.bk-cal-day.selected {
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
}
.bk-cal-day:disabled {
  color: rgba(245,245,247,0.2);
  cursor: default;
}
.bk-cal-day.today {
  border: 1px solid rgba(59,130,246,0.4);
}
.bk-cal-day.empty {
  cursor: default;
}

/* ---- Time slots ---- */
.bk-slots-label {
  font-size: 0.82rem;
  color: rgba(245,245,247,0.5);
  margin-bottom: 0.75rem;
}
.bk-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.bk-slot {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0.6rem 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #f5f5f7;
  cursor: pointer;
  transition: all 0.15s;
}
.bk-slot:hover:not(.unavailable) {
  border-color: rgba(59,130,246,0.5);
  background: rgba(59,130,246,0.08);
  color: #60a5fa;
}
.bk-slot.selected {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
  font-weight: 600;
}
.bk-slot.unavailable {
  opacity: 0.28;
  cursor: not-allowed;
  text-decoration: line-through;
}
.bk-no-slots {
  text-align: center;
  color: rgba(245,245,247,0.4);
  font-size: 0.9rem;
  padding: 1.5rem 0;
}

/* Booking summary chip */
.bk-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  color: #60a5fa;
  margin-bottom: 1.25rem;
}

/* ---- Forms ---- */
.bk-form-group {
  margin-bottom: 1rem;
}
.bk-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.bk-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(245,245,247,0.65);
  margin-bottom: 0.35rem;
}
.bk-form-group input,
.bk-form-group select,
.bk-form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: #f5f5f7;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
}
.bk-form-group input:focus,
.bk-form-group select:focus,
.bk-form-group textarea:focus {
  border-color: rgba(59,130,246,0.6);
}
.bk-form-group select option {
  background: #1a1a24;
  color: #f5f5f7;
}
.bk-form-group textarea {
  resize: vertical;
  min-height: 80px;
}
.bk-form-group input::placeholder,
.bk-form-group textarea::placeholder {
  color: rgba(245,245,247,0.3);
}

/* Buttons */
.bk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.bk-btn-primary {
  background: #3b82f6;
  color: #fff;
  width: 100%;
  margin-top: 0.5rem;
}
.bk-btn-primary:hover:not(:disabled) { background: #2563eb; }
.bk-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Message / status */
.bk-msg {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  margin-top: 0.75rem;
  display: none;
}
.bk-msg.success {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  color: #10b981;
  display: block;
}
.bk-msg.error {
  background: rgba(255,140,66,0.1);
  border: 1px solid rgba(255,140,66,0.3);
  color: #ff8c42;
  display: block;
}

/* Confirmation screen */
.bk-confirm {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}
.bk-confirm-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}
.bk-confirm h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #10b981;
}
.bk-confirm p {
  font-size: 0.88rem;
  color: rgba(245,245,247,0.6);
  line-height: 1.6;
}
.bk-confirm-details {
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
  text-align: left;
  font-size: 0.85rem;
}
.bk-confirm-details p {
  color: rgba(245,245,247,0.75);
  margin-bottom: 0.35rem;
  text-align: left;
}
.bk-confirm-details p:last-child { margin-bottom: 0; }
.bk-confirm-details strong { color: #f5f5f7; }

/* Loading spinner */
.bk-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  color: rgba(245,245,247,0.5);
  font-size: 0.88rem;
}
.bk-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(59,130,246,0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: bk-spin 0.7s linear infinite;
}
@keyframes bk-spin { to { transform: rotate(360deg); } }

@media (max-width: 500px) {
  .booking-paths { grid-template-columns: 1fr; }
  .bk-slots-grid { grid-template-columns: repeat(2, 1fr); }
  .bk-form-row  { grid-template-columns: 1fr; }
  .booking-header, .booking-body { padding-left: 1.25rem; padding-right: 1.25rem; }
  .booking-header { padding-top: 1.5rem; }
}
