/* ============================================================
   booking.css
   ============================================================ */

.booking-header h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 6px; color: var(--heading-accent); }
.booking-header p { font-size: 0.98rem; color: var(--text-muted); display: flex; justify-content: center; align-items: center; gap: 10px; }

.booking-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: start;
}
.booking-img-placeholder {
  background: #000;
  border-radius: var(--radius);
  height: 280px;
  margin-bottom: 22px;
}
.booking-desc-block {
  font-size: 1.1rem; color: var(--text-muted);
  line-height: 1.75; margin-bottom: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.booking-includes-block, .booking-comfort-block { margin-bottom: 16px; }
.booking-includes-block h4, .booking-comfort-block h4 {
  font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; color: var(--text);
}
.includes-list { display: flex; flex-direction: column; gap: 7px; }
.incl-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.05rem; color: var(--text-muted);
}
.incl-dot { width: 8px; height: 8px; background: var(--terracotta); border-radius: 50%; flex-shrink: 0; }
.comfort-list {
  list-style: disc; padding-left: 18px;
  font-size: 1.05rem; color: var(--text-muted); line-height: 1.85;
}
.booking-duration { font-size: 1.2rem; font-weight: 500; color: var(--text); }
.booking-duration strong { color: var(--terracotta); }

/* Form */
.form-label {
  font-size: 1rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px; display: block;
}
.form-select {
  width: 100%; padding: 13px 16px;
  border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--white);
  font-family: 'Ubuntu', sans-serif;
  font-size: 0.9rem; color: var(--text);
  outline: none; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b5a4a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  transition: border-color 0.2s;
}
.form-select:focus { border-color: var(--terracotta); }
.calendar-trigger-btn {
  display: none;
  width: 100%;
  margin-bottom: 14px;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-family: 'Ubuntu', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.calendar-trigger-btn:hover { border-color: var(--terracotta); transform: translateY(-1px); }

.slots-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.slot-btn {
  padding: 10px 15px;
  border-radius: 8px; border: 2px solid var(--border);
  background: var(--white); cursor: pointer;
  font-family: 'Ubuntu', sans-serif;
  font-size: 0.95rem; font-weight: 600;
  color: var(--text); line-height: 1.4; text-align: center;
  transition: all 0.22s;
}
.slot-btn span { font-weight: 400; color: var(--text-muted); }
.slot-btn:hover { border-color: var(--terracotta); background: rgba(212,126,95,0.05); transform: translateY(-2px); }
.slot-btn.active {
  background: var(--terracotta); border-color: var(--terracotta);
  color: var(--white); box-shadow: 0 4px 14px rgba(212,126,95,0.35);
  transform: translateY(-2px);
}
.slot-btn.active span { color: rgba(255,255,255,0.75); }
.slot-custom { border-style: dashed; color: var(--text-muted); }
.slot-custom:hover { color: var(--terracotta); border-color: var(--terracotta); }

.price-block {
  background: var(--bg); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 16px 18px; margin-bottom: 18px;
}
.price-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; padding-bottom: 12px;
}
.pr-label { font-size: 0.95rem; color: var(--text-muted); flex: 1; }
.pr-val { font-weight: 700; color: var(--terracotta); font-size: 0.9rem; }
.qty-ctrl { display: flex; align-items: center; gap: 12px; }
.qty-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--terracotta); background: none;
  color: var(--terracotta); font-size: 1rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.qty-btn:hover { background: var(--terracotta); color: var(--white); }
.qty-num { font-weight: 700; min-width: 18px; text-align: center; }
.pr-sub { font-weight: 700; min-width: 70px; text-align: right; }
.total-row {
  display: flex; justify-content: space-between;
  font-weight: 700; font-size: 1rem;
  border-top: 1.5px solid var(--border); padding-top: 12px;
}

.form-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.booking-messenger-block { margin-bottom: 16px; }
.messenger-note {
  margin-top: 10px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.form-input {
  width: 100%; padding: 13px 18px;
  border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--white);
  font-family: 'Ubuntu', sans-serif;
  font-size: 0.9rem; color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus { border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(212,126,95,0.1); }
.form-input::placeholder { color: rgba(107,90,74,0.55); }

.checkbox-row {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.82rem; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 14px;
}
.custom-checkbox {
  width: 22px; height: 22px;
  border: 2px solid var(--terracotta); border-radius: 5px;
  flex-shrink: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; margin-top: 1px;
}
.custom-checkbox svg {
  width: 12px; height: 12px; stroke: var(--white);
  opacity: 0; transform: scale(0.4);
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.custom-checkbox.checked { background: var(--terracotta); }
.custom-checkbox.checked svg { opacity: 1; transform: scale(1); }
.checkbox-row a { color: var(--terracotta); text-decoration: underline; }

.contact-alt { margin-top: 28px; text-align: center; }
.contact-alt p { font-size: 1.1rem; margin-bottom: 14px; color: var(--text); font-weight: 500; }
.contact-icons { display: flex; justify-content: center; gap: 16px; }
.ci {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  transition: background 0.2s, transform 0.2s;
}
.ci:hover { background: var(--terracotta); transform: scale(1.1) rotate(-5deg); }
.booking-icon {
  display: inline-flex;
  
  max-width: 50px;
}
@media (max-width: 860px) { .booking-layout { grid-template-columns: 1fr; } }

/* ============================================================
   CALENDAR
============================================================ */
.booking-calendar {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 16px;
  margin-bottom: 20px;
  user-select: none;
}
.calendar-overlay {
  position: fixed;
  inset: 0;
  z-index: 3200;
  background: rgba(20,12,6,0.64);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.calendar-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.calendar-sheet {
  width: 100%;
  max-width: 560px;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 18px 16px 22px;
  box-shadow: 0 -18px 44px rgba(0,0,0,0.24);
  transform: translateY(24px);
  transition: transform 0.28s ease;
}
.calendar-overlay.open .calendar-sheet { transform: translateY(0); }
.calendar-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.calendar-sheet-header h3 {
  font-size: 1.05rem;
  color: var(--heading-accent);
}
.calendar-sheet-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(60,47,36,0.08);
  color: var(--heading-accent);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.cal-month-label {
  font-weight: 700; font-size: 0.95rem; color: var(--heading-accent);
}
.cal-nav {
  background: none; border: none; cursor: pointer;
  font-size: 1.5rem; color: var(--terracotta);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background 0.2s;
  line-height: 1;
}
.cal-nav:hover { background: rgba(212,126,95,0.1); }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7,1fr);
  text-align: center; margin-bottom: 6px;
}
.cal-weekdays span {
  font-size: 0.72rem; font-weight: 700;
  color: var(--text-muted); letter-spacing: 0.05em;
  padding: 4px 0;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 3px;
}
.cal-day {
  aspect-ratio: 1;
  border: none; border-radius: 8px; background: none;
  font-family: 'Ubuntu', sans-serif; font-size: 0.85rem;
  cursor: pointer; transition: background 0.15s, color 0.15s;
  display: flex; align-items: center; justify-content: center;
  font-weight: 400; color: var(--text);
}
.cal-empty { background: none !important; cursor: default; }
.cal-today { font-weight: 700; color: var(--terracotta); }
.cal-free:hover { background: rgba(212,126,95,0.12); }
.cal-selected {
  background: var(--terracotta) !important;
  color: #fff !important; font-weight: 700;
}
.cal-past  { color: rgba(107,90,74,0.3); cursor: default; }
.cal-booked {
  background: rgba(107,90,74,0.12);
  color: rgba(107,90,74,0.35);
  cursor: not-allowed;
  text-decoration: line-through;
}
.cal-selected-info {
  font-size: 0.82rem; color: var(--terracotta);
  text-align: center; margin-top: 10px; font-weight: 600;
  min-height: 1.2em;
}

/* ============================================================
   Inline legal button (в тексте чекбокса)
============================================================ */
.legal-inline-btn {
  background: none; border: none; padding: 0;
  color: var(--terracotta); font-size: inherit;
  font-family: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}

/* ============================================================
   SUCCESS MODAL
============================================================ */
.success-overlay {
  position: fixed; inset: 0;
  background: rgba(20,12,6,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.success-overlay.open { opacity: 1; pointer-events: all; }
.success-modal {
  background: var(--white);
  border-radius: 18px;
  padding: 40px 32px;
  max-width: 420px; width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  transform: translateY(24px) scale(0.96);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.success-overlay.open .success-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.success-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--terracotta); color: #fff;
  font-size: 2rem; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.success-modal h3 { font-size: 1.5rem; color: var(--heading-accent); margin-bottom: 10px; }
.success-modal p  { font-size: 0.92rem; color: var(--text-muted); line-height: 1.7; }
.success-sub { margin-top: 14px !important; font-weight: 600; color: var(--text) !important; }
.success-contact-icons { margin-top: 14px; }

/* СЛУЖЕБНОЕ: адаптация мобильной success-модалки и календаря */
@media (max-width: 700px) {
  .calendar-trigger-btn { display: block; }
  #calendarInlineHost { display: none; }
  .success-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .success-modal {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 28px 20px 24px;
  }
  .success-modal h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
  }
  .success-modal p {
    font-size: 0.9rem;
  }
  .contact-icons {
    gap: 12px;
    flex-wrap: wrap;
  }
}
