/* Формы на главной (уникализированные классы для модального окна) */

/* ===== FORM GRID ===== */
.form-grid {
  display: flex;
  gap: 16px 18px;
  align-items: start;
}

/* ===== УНИКАЛЬНЫЙ БЛОК ДЛЯ МОДАЛЬНОГО ОКНА ===== */
.field-group_modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 49%;
}

/* ===== INPUTS ===== */
.field-group_modal input,
.field-group_modal textarea {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #6cb043;
  border-radius: 5px;
  font-family: "Commissioner", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 124.3%;
  color: #000000;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  min-height: 45px;
  resize: vertical;
}
.field-group_modal input::placeholder,
.field-group_modal textarea::placeholder {
  font-family: "Commissioner", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 124.3%;
  color: #8b8b8b;
  opacity: 1;
}

.field-group_modal textarea {
  min-height: 102px;
  resize: vertical;
}

/* ===== COMMENT (spans 2 cols) ===== */
.field-group_modal--comment {
  grid-column: span 2;
}
.field-group_modal--comment textarea {
  min-height: 102px;
}

/* ===== DATE & TIME with icons ===== */
.field-group_modal--date input,
.field-group_modal--time input {
  padding-right: 44px;
}

.field-group_modal__icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.field-group_modal__icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

/* ===== CHECKBOX GROUP ===== */
.field-group_modal--checkbox {
  grid-column: span 1;
  justify-self: end;
  align-self: center;
  margin-top: 2px;
}
.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.checkbox-wrapper input[type="checkbox"] {
  display: none;
}
.checkbox-wrapper .checkmark {
  flex-shrink: 0;
  width: 19.72px;
  height: 20px;
  border: 1px solid #6cb043;
  border-radius: 3px;
  background: transparent;
  position: relative;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
  margin-top: 1px;
}
.checkbox-wrapper input:checked + .checkmark {
  background: rgba(255, 255, 255, 0.15);
  border-color: #6cb043;
}
.checkbox-wrapper input:checked + .checkmark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 8px;
  height: 13px;
  border: solid #6cb043;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
/* .checkbox-wrapper .checkmark:hover {
  border-color: rgba(255, 255, 255, 0.7);
} */
.checkbox-wrapper .check-label {
  font-family: "FuturaDemiC", "Commissioner", sans-serif;
  font-weight: 600;
  font-size: 10px;
  line-height: 100%;
  color: #ffffff;
  letter-spacing: 0.01em;
}

/* ===== Оверлей ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}
.modal-overlay.active {
  display: flex;
}

/* ===== Модальное окно ===== */
.modal {
  background: #ffffff;
  max-width: 475px;
  width: 100%;
  padding: 16px 33px 16px;
  transform: scale(0.92);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  opacity: 0;
  position: relative;
  background: #ffffff;
  border-radius: 5px;
  border: 2px solid #b7e09f;
}
.modal-overlay.active .modal {
  opacity: 1;
}

/* ===== Заголовок ===== */
.modal-title {
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 100%;
  color: #000000;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== Крестик ===== */
.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #888;
  transition:
    color 0.2s,
    transform 0.2s;
  padding: 0 4px;
}
.close-btn:hover {
  color: #e74c3c;
  transform: rotate(90deg);
}

/* ===== Тело ===== */
.modal-body {
  font-size: 16px;
  line-height: 1.6;
  color: #2d2d44;
  margin: 8px 0 22px;
}
.modal-body p {
  margin-bottom: 10px;
}
.modal-body p:last-child {
  margin-bottom: 0;
}

/* ===== Футер ===== */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 6px;
}
.modal-footer button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
}
.btn-secondary {
  background: #e9ecf3;
  color: #2d2d44;
}
.btn-secondary:hover {
  background: #d5dae6;
}
.btn-primary {
  background: #6cb043;
  color: #fff;
}
.btn-primary:hover {
  background: #6cb043;
}

/* ===== Анимация ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== Адаптив ===== */
@media (max-width: 480px) {
  .modal {
    padding: 16px 16px 16px;
  }
  .modal-title {
    font-size: 20px;
  }
  .modal-footer {
    flex-direction: column;
    width: 100%;
    margin-left: 90%;
  }
  .modal-footer button {
    text-align: center;
  }
}

.modal_button_close {
  background: #6cb043;
  border: 1px solid #6cb043;
  border-radius: 5px;
  transform: rotate(180deg);
}
.modal_timework_text p {
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
  line-height: 137%;
  color: #000000;
}
.modal_timework_text .modal_green_text {
  color: #6cb043;
}
.top_close_modal {
  right: 5px;
  top: 5px;
}
.btn-primary.modal_button_close.top_close_modal {
  position: absolute;
  width: 32px;
  height: 32px;
  padding: 0;
}

.modalDescription {
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  line-height: 100%;
  color: #000000;
  padding-bottom: 18px;
}
.modal_input {
  background: #ffffff;
  border: 1px solid #b8d5a6;
  border-radius: 5px;
}

/* ===== Кастомный селект ===== */
.custom-select-header {
  background: #ffffff;
  border: 1px solid #6cb043;
  padding: 10px 18px;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-style: normal;
  font-weight: 500;
  font-size: 15px;
  line-height: 124.3%;
  background: #ffffff;
  border-radius: 5px;
  color: #8b8b8b;
}
.custom-select-header:hover {
  border-color: #6cb043;
}
.custom-select-header:focus-within {
  border-color: #6cb043;
}
.custom-select-arrow {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  color: #64748b;
}
.custom-select-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.custom-select-header.open .custom-select-arrow {
  transform: rotate(180deg);
}
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #e9edf4;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(-6px);
  z-index: 100;
}
.custom-select-dropdown.open {
  max-height: 300px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.custom-select-item {
  padding: 14px 20px;
  font-size: 17px;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
}
.custom-select-item:last-child {
  border-bottom: none;
}
.custom-select-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.custom-select-item.selected {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}
.custom-select-item.selected::before {
  content: "✓";
  font-weight: 700;
  color: #2563eb;
  margin-right: 4px;
}

/* ===== Адаптив селекта ===== */
@media (max-width: 480px) {
  .custom-select-wrapper {
    width: 100%;
  }
  .custom-select-header {
    padding: 12px 16px;
    font-size: 16px;
  }
  .custom-select-item {
    padding: 12px 16px;
    font-size: 15px;
  }
}

/* ===== Лейбл ===== */
.modal-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

/* ===== Контейнер для селекта ===== */
.field-group_modal--select {
  margin-bottom: 16px;
}

/* ===== Переопределение для модального окна ===== */
.modal-overlay .field-group_modal .modal_input {
  background: #ffffff;
  border: 1px solid #6cb043;
  border-radius: 5px;
  color: #8b8b8b;
}
.modal-overlay .field-group_modal .modal_input::placeholder {
  color: #8b8b8b;
}

.modal_help_block .field-group_modal {
  width: 100%;
  margin-bottom: 11px;
}
.field-group_modal {
  width: 100%;
}

.form_btn_submit {
  background: #6cb043;
  border: 1px solid #6cb043;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.11);
  border-radius: 5px;
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
  line-height: 124.3%;

  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  align-content: stretch;

  color: #ffffff;
  padding: 8px 10px;
  min-width: 129px;
}

.field-group_modal--checkbox .check-label {
  font-style: normal;
  font-weight: 400;
  font-size: 10px;
  line-height: 100%;
  /* or 10px */
  display: flex;
  align-items: center;

  color: rgba(108, 176, 67, 0.87);
  margin-right: 10px;
}

.booking_form_footer {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  align-content: stretch;
}

.modal_subscribe_bg {
  background: linear-gradient(135.45deg, #6cb043 24.8%, #188542 143.15%);
  border: 1px solid #6cb043;
  border-radius: 5px;
}

.modal_subscribe_bg #modalTitle {
  color: #fff;
}

.modal_subscribe_bg .modalDescription {
  color: #fff;
}

.modal.modal_subscribe_bg .field-group_modal--checkbox .check-label {
  font-style: normal;
  font-weight: 400;
  font-size: 10px;
  line-height: 100%;
  /* or 10px */
  display: flex;
  align-items: center;

  color: #b7e09f;
}

.modal.modal_subscribe_bg .checkbox-wrapper .checkmark {
  border: 1px solid #b7e09f;
}

.checkbox-wrapper input:checked + .checkmark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 8px;
  height: 13px;
  border: solid #b7e09f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
