/* /srv/www/d-klinic.ru/css/booking-modal.css
   v1.0.0 — Стили централизованной модалки записи на приём
   09.06.2026: вынесено из inline <style> в index.html. Использует premium-booking.css для календаря. */

/* ─── Overlay ─── */
.booking-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999999;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}
.booking-overlay.active { display: flex; }

/* ─── Основная карточка модалки ─── */
.booking-modal {
  background: #FDFDF7;
  border-radius: 20px;
  width: 95%;
  max-width: 1080px;
  max-height: 94vh;
  overflow-y: auto;
  position: relative;
  animation: bookingIn 0.4s ease;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  scrollbar-width: none;
  -ms-overflow-style: none;
  transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.booking-modal::-webkit-scrollbar { display: none; }
.booking-modal::-webkit-scrollbar-thumb { background: #E8B94A; border-radius: 4px; }

/* ─── Заголовок модалки ─── */
.booking-header {
  background: linear-gradient(135deg, #413F3B 0%, #2a2826 100%);
  padding: 20px 25px 15px;
  border-radius: 20px 20px 0 0;
  position: relative;
  overflow: hidden;
  cursor: grab;
}
.booking-header:active { cursor: grabbing; }
.booking-header::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(232,185,74,0.1);
  border-radius: 50%;
}
.booking-header::after {
  content: '';
  position: absolute;
  bottom: -20px; left: 40px;
  width: 80px; height: 80px;
  background: rgba(0,128,128,0.1);
  border-radius: 50%;
}
.booking-header h3 {
  font-family: 'Cormorant Garamond', serif;
  color: #FFFFFF;
  font-size: 26px;
  margin: 0 0 5px;
  font-weight: 700;
}
.booking-header p {
  color: #E8B94A;
  font-size: 14px;
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}

/* ─── Кнопка закрытия ─── */
.booking-close {
  position: absolute;
  top: 15px; right: 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 28px;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 2;
}
.booking-close:hover { color: #E8B94A; transform: rotate(90deg); }

/* ─── Тело модалки ─── */
.booking-body { padding: 18px 25px 22px; }

/* ─── Поля формы ─── */
.booking-field { margin-bottom: 12px; }
.booking-field label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #413F3B;
  margin-bottom: 6px;
}
.booking-field input,
.booking-field select,
.booking-field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E8E8E0;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: #413F3B;
  background: #FFFFFF;
  transition: all 0.3s;
  outline: none;
  box-sizing: border-box;
}
.booking-field input:focus,
.booking-field select:focus,
.booking-field textarea:focus {
  border-color: #008080;
  box-shadow: 0 0 0 3px rgba(0,128,128,0.1);
}
.booking-field textarea { height: 50px; resize: none; }
.booking-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23413F3B' fill='none' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* ─── Чипы услуг ─── */
.booking-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.booking-services label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #413F3B;
  margin-bottom: 8px;
  width: 100%;
}
.booking-chip {
  display: inline-block;
  padding: 8px 16px;
  border: 2px solid #E8E8E0;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #413F3B;
  cursor: pointer;
  transition: all 0.3s;
  user-select: none;
}
.booking-chip:hover { border-color: #008080; color: #008080; }
.booking-chip.selected {
  background: #008080;
  border-color: #008080;
  color: #FFFFFF;
}

/* ─── Двухколоночная разметка строки ─── */
.booking-row { display: flex; gap: 12px; }
.booking-row .booking-field { flex: 1; }

/* ─── Кнопка отправки ─── */
.booking-submit {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #413F3B, #2a2826);
  color: #E8B94A;
  border: none;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}
.booking-submit:hover {
  background: linear-gradient(135deg, #008080, #006666);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,128,128,0.3);
}
.booking-submit:active { transform: translateY(0); }

/* ─── Разделитель ─── */
.booking-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #E8B94A, transparent);
  margin: 5px 0 18px;
}

/* ─── Success-состояние ─── */
.booking-success { display: none; text-align: center; padding: 50px 35px; }
.booking-success.active { display: block; }
.booking-success .success-icon { margin-bottom: 20px; }
.booking-success h3 {
  font-family: 'Cormorant Garamond', serif;
  color: #413F3B;
  font-size: 24px;
  margin-bottom: 8px;
}
.booking-success p { color: #888; font-size: 15px; line-height: 1.6; }
.booking-form.hidden { display: none; }

/* ─── Адаптивная вёрстка ─── */
@media (max-width: 576px) {
  .booking-modal { width: 100%; max-width: 100%; border-radius: 16px; margin: 10px; }
  .booking-header { padding: 22px 20px 18px; border-radius: 16px 16px 0 0; }
  .booking-header h3 { font-size: 22px; }
  .booking-body { padding: 20px 20px 25px; }
  .booking-row { flex-direction: column; gap: 0; }
  .booking-chip { font-size: 11px; padding: 7px 12px; }
}

/* ─── Тост уведомлений ─── */
.booking-toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #413F3B;
  color: #E8B94A;
  padding: 14px 30px;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999999;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  border-left: 3px solid #E8B94A;
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
}
.booking-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ─── Анимация появления модалки ─── */
@keyframes bookingIn {
  from { transform: translateY(30px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ─── Drag-режим ─── */
.booking-modal.dragging { user-select: none; }
