/* Стили для форм обратной связи */

/* Контейнер ошибок формы - общие стили */
.form__error {
  display: none;
  padding: 12px 15px;
  margin-bottom: 15px;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  color: #721c24;
  font-size: 14px;
  line-height: 1.5;
  width: 100%;
  box-sizing: border-box;
}

.form__error.show {
  display: block !important;
}

/* Специфичные стили для форм */
.feedback-form .form__error {
  width: 100%;
}

.get-price-form .form__error {
  margin-left: 10px;
  margin-right: 10px;
  width: calc(100% - 20px);
}

/* Сообщение об успехе - общие стили */
.form__success {
  padding: 24px 30px;
  background-color: #ffffff;
  border-left: 7px solid #11528e;
  box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16);
  color: #4d4d4d;
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  position: relative;
  width: 100%;
}

.form__success::before {
  content: '✓';
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  background-color: #11528e;
  color: #ffffff;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  margin-right: 12px;
  vertical-align: middle;
}

/* Ошибки полей */
.field-error {
  display: block;
  color: #dc3545;
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.4;
}

/* Поля с ошибкой - общие стили для всех форм */
.feedback-form input.error,
.feedback-form textarea.error,
.get-price-form input.error,
.get-price-form textarea.error,
.feedback-form input[type="text"].error,
.feedback-form input[type="tel"].error,
.feedback-form input[type="email"].error,
.get-price-form input[type="text"].error,
.get-price-form input[type="tel"].error,
.get-price-form input[type="email"].error {
  border-color: #dc3545 !important;
  background-color: #fff5f5 !important;
}

.feedback-form input.error:focus,
.feedback-form textarea.error:focus,
.get-price-form input.error:focus,
.get-price-form textarea.error:focus,
.feedback-form input[type="text"].error:focus,
.feedback-form input[type="tel"].error:focus,
.feedback-form input[type="email"].error:focus,
.get-price-form input[type="text"].error:focus,
.get-price-form input[type="tel"].error:focus,
.get-price-form input[type="email"].error:focus {
  border-color: #dc3545 !important;
  outline-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Кнопка отправки - состояние загрузки - общие стили */
.feedback-form input[type="submit"]:disabled,
.get-price-form input[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Адаптивность */
@media (max-width: 768px) {
  .form__error,
  .feedback-form .form__error,
  .get-price-form .form__error {
    font-size: 13px;
    padding: 10px 12px;
  }

  .form__success,
  .feedback-form .form__success,
  .get-price-form .form__success {
    font-size: 14px;
    padding: 20px 15px;
  }

  .form__success::before,
  .feedback-form .form__success::before,
  .get-price-form .form__success::before {
    width: 28px;
    height: 28px;
    line-height: 28px;
    font-size: 18px;
    margin-right: 10px;
  }
}

