

/* ==================== БАЗОВАЯ СТРУКТУРА ФОРМЫ ==================== */
form._form {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.form-group {
  text-align: center;
  width: 100%;
  position: relative;
  margin-bottom: 15px;
}

/* ==================== ИНПУТЫ ==================== */
.form-group input {
  color: #000;
  background-color: #fff;
  height: 46px;
  font-size: 18px;
  border: none;
  border-bottom: 1px solid #000 !important;
  width: 100%;
  padding-left: 20px;
  box-sizing: border-box;
  transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}

.form-group input:focus {
  outline: none;
  /* Легкое свечение при фокусе, чтобы сохранить юзабилити */
  box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.2);
}

.form-group input::placeholder {
  font-weight: 300;
  font-size: 18px;
  color: rgba(0, 0, 0, 0.5);
}

/* Стили для библиотеки телефонов (intlTelInput) */
.iti {
  width: 100%;
  color: #000;
}

.iti__selected-flag {
  z-index: 10;
}

/* ==================== КНОПКА ОТПРАВКИ ==================== */
button.reg-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  height: 50px;
  width: 100%;
  background-color: #D4AF37;
  border-radius: 5px;
  font-size: 21px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  line-height: 23px;
  box-shadow: 0 4px 4px 0 rgb(0 0 0 / 20%);
  color: #fff;
  border: 1px solid #fff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button.reg-btn:hover {
  background-color: #c02429; /* Слегка затемняем при наведении */
}

/* ==================== ВАЛИДАЦИЯ (Подхватывает классы от JS) ==================== */
/* Успешная валидация */
.form-group input.valid:-webkit-autofill,
.form-group input.valid {
  border-bottom: 1px solid green !important;
  background-color: #0dfc703b !important;
}

/* Ошибка валидации */
.form-group input.isValid:-webkit-autofill,
.form-group input.isValid {
  border-bottom: 1px solid red !important;
  background-color: #fc310d42 !important;
}

.form-group input.notvalidphone {
  background-color: rgb(253, 164, 164) !important;
  border: 1px solid red !important;
}

/* Если JS динамически генерирует сообщения об ошибках */
.phone-eror-mess {
  display: block;
  width: 100%;
  color: #fff;
  line-height: 1.2em;
  background-color: red;
  margin-bottom: 15px;
}

.form_error_msg {
  color: #ff0000;
  position: absolute;
  top: 42px;
  left: 0;
  font-size: 12px;
}

.form-error-content {
  margin-bottom: 10px;
  text-align: center;
  background: #cb0d0d;
  color: #fff;
  text-transform: uppercase;
  padding: 5px;
  display: none;
}

.form-error-content.active {
  display: block;
}

/* ==================== ПРЕЛОАДЕР (Лоадер при отправке) ==================== */
.loader {
  display: none; /* Скрыт по умолчанию. Твой JS должен менять display на block/flex */
  margin: 10px auto;
}

.preloaderWrapperForm {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.83);
  z-index: 9999;
  text-align: center;
}

.preloaderWrapperForm span {
  width: 5px;
  height: 50px;
  background: linear-gradient(180deg, #7f4095, #fb3393);
  display: inline-block;
  margin: 0 1px;
  border-radius: 50px;
  animation: animade 1.5s infinite ease-in-out;
  margin-right: 4px !important;
}

.preloaderWrapperForm span:nth-child(1) { animation-delay: 1.1s; }
.preloaderWrapperForm span:nth-child(2) { animation-delay: 1.2s; }
.preloaderWrapperForm span:nth-child(3) { animation-delay: 1.3s; }
.preloaderWrapperForm span:nth-child(4) { animation-delay: 1.4s; }
.preloaderWrapperForm span:nth-child(5) { animation-delay: 1.5s; }

@keyframes animade {
  0%, 50%, 100% { transform: scaleY(0.5); }
  20% { transform: scaleY(1); }
}