/* Стили для формы подписки на рассылку */

/* Ошибки для поля email */
.text-wrapper-38.error {
  border-color: #EF4444 !important;
  background-color: #FEF2F2 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1) !important;
  animation: shake 0.5s ease-in-out;
}

.text-wrapper-38.error::placeholder {
  color: #EF4444 !important;
}

/* Ошибки для чекбоксов */
.custom-checkbox.error {
  background-color: #FEF2F2 !important;
  border: 2px solid #EF4444 !important;
  border-radius: 8px !important;
  padding: 8px !important;
  margin: 4px 0 !important;
  animation: shake 0.5s ease-in-out;
}

.custom-checkbox.error .checkmark {
  border-color: #EF4444 !important;
  background-color: #FEF2F2 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

.custom-checkbox.error .label-text {
  color: #EF4444 !important;
  font-weight: 600 !important;
}

/* Анимация тряски */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
  20%, 40%, 60%, 80% { transform: translateX(2px); }
}

/* Состояние загрузки для кнопки отправки */
.btn-submit:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

/* Успешное состояние */
.text-wrapper-38.success {
  border-color: #10B981 !important;
  background-color: #ECFDF5 !important;
  color: #065F46 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
  animation: successPulse 0.6s ease-out;
}

.text-wrapper-38.success::placeholder {
  color: #065F46 !important;
}

/* Анимация успеха */
@keyframes successPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  }
}

/* Улучшенные стили для чекбоксов */
.custom-checkbox {
  transition: all 0.2s ease;
}

.custom-checkbox:hover .checkmark {
  border-color: #FCC419;
}

/* Стили для обязательного чекбокса */
.required-checkbox {
  border-radius: 8px;
  padding: 0;
}

.required-checkbox .label-text {
  font-weight: 500;
}

.required-indicator {
  color: #EF4444;
  font-weight: bold;
  font-size: 16px;
  margin-left: 4px;
}

/* Анимация привлечения внимания для обязательного чекбокса (только при необходимости) */
.required-checkbox.needs-attention {
  animation: subtlePulse 2s ease-in-out infinite;
}

@keyframes subtlePulse {
  0%, 100% {
    border-color: #E5E7EB;
    background: #F9FAFB;
  }
  50% {
    border-color: #FCC419;
    background: #FFFBEB;
  }
}

/* Анимация ошибки для чекбокса */
@keyframes errorPulse {
  0%, 100% {
    border-color: #EF4444;
    background: #FEF2F2;
    transform: scale(1);
  }
  50% {
    border-color: #DC2626;
    background: #FEE2E2;
    transform: scale(1.02);
  }
}

.custom-checkbox.error {
  animation: shake 0.5s ease-in-out;
}

/* Фокус состояния */
.text-wrapper-38:focus {
  outline: none;
  border-color: #FCC419 !important;
  box-shadow: 0 0 0 2px rgba(252, 196, 25, 0.2) !important;
}

/* Анимации для уведомлений */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Стили для сообщений */
.privacy-error-message,
.success-notification,
.contact-success-notification {
  animation: slideInRight 0.3s ease-out !important;
}

/* Адаптивность */
@media (max-width: 860px) {
  .custom-checkbox.error .label-text {
    font-size: 14px;
  }
  
  .privacy-error-message,
  .success-notification,
  .contact-success-notification {
    top: 10px !important;
    right: 10px !important;
    left: 10px !important;
    font-size: 13px !important;
    padding: 12px 16px !important;
    max-width: none !important;
  }
  
  .required-checkbox,
  .custom-checkbox {
    padding: 4px 0 !important;
    margin: 0 !important;
  }
  
  .required-indicator {
    font-size: 14px !important;
  }
}
