/* Базовые стили модального окна */
.modal {
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
  animation: fadeIn 0.3s;
}

.modal-content {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

/* Заголовок и кнопка закрытия */
.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  background: none;
  border: none;
  padding: 0;
  z-index: 10;
}

/* Контейнер формы */
.modal-form {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Прогресс-бар */
.progress-container {
  height: 4px;
  background: var(--gray);
  width: 100%;
  margin-bottom: 24px;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
}

/* Шаги формы */
.form-step {
  display: none;
  flex-direction: column;
  flex-grow: 1;
  animation: fadeIn 0.3s forwards;
}

.form-step.active {
  display: flex;
}

/* Заголовок шага */
.form-step h3 {
  font-size: 1.25rem;
  color: var(--dark);
  margin: 0 0 20px 0;
  font-weight: 600;
}

/* Группы полей */

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
}

/* Элементы формы */


/* Календарь */
.date-range-input {
  background-color: var(--white);
  cursor: pointer;
}

/* Контейнер для детей */
.children-container {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.child-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.child-row select {
  flex-grow: 1;
}

.btn-remove-child {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--primary);
  padding: 0;
}

/* Кнопки навигации */
.step-buttons {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}

.step-buttons .btn {
  flex: 1;
  padding: 12px;
}

/* Ошибки */
.form-error {
  color: var(--primary);
  font-size: 0.8125rem;
  margin-top: 4px;
  display: none;
}

/* Стили для ошибок под полями */
.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: none;
    line-height: 1.4;
}

/* Стили для полей с ошибками */
.form-step input.error {
    border-color: #dc3545 !important;
    background-color: #fff8f8;
    margin-bottom: 0;
}

/* Стили для чекбокса с ошибкой */
.consent-text.error {
    border: 1px solid #dc3545;
    border-radius: 4px;
    padding: 8px;
    background-color: #fff8f8;
    margin: 8px 0;
}

.consent-text.error .field-error {
    margin-top: 8px;
    font-size: 12px;
}


/* Чекбокс */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
}

.form-check-input {
  margin-top: 4px;
}

.form-check-label {
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Подсказки */
.form-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 4px;
  display: block;
}

/* Анимации */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Анимации перехода между шагами */
.slide-enter-active,
.slide-leave-active {
  transition: all 0.3s ease;
}
.slide-enter-from {
  opacity: 0;
  transform: translateX(30px);
}
.slide-leave-to {
  opacity: 0;
  transform: translateX(-30px);
}
.early-booking-mode .form-step h3 {
  color: var(--primary);
}

.early-booking-mode .badge {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  margin-left: 10px;
}

.early-booking-header {
  text-align: center;
  margin-bottom: 20px;
}

.main-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 8px;
}

.discount-subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
}

.discount-text {
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.discount-value {
  font-size: 24px;
  font-weight: bold;
  color: #e74c3c;
  background-color: #fff2cc;
  padding: 4px 12px;
  border-radius: 20px;
  border: 2px solid #e67e22;
}

@media (min-width: 768px) {
  .modal {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  .modal-content {
    max-width: 500px;
    max-height: 90vh;
  }

  .modal-form {
    padding: 32px;
  }

  .close-btn {
    top: 16px;
    right: 16px;
  }

  .form-step h3 {
    font-size: 1.5rem;
  }
}

/* ===== ДЕСКТОП ===== */
@media (min-width: 1024px) {
  .modal-content {
    max-width: 600px;
  }

  .modal-form {
    padding: 40px;
  }

  .step-buttons .btn {
    padding: 14px;
  }
}