/* Модуль обратной связи - стили в соответствии с materials.css */
.mod-feedback {
  margin-bottom: 30px;
  font-family: "Gilroy", Arial, sans-serif;
  width: 100%;
  line-height: 1.6;
}

.feedback-form-wrapper {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.feedback-form-wrapper:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 15px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.feedback-form-wrapper h3 {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  margin: 0;
  padding: 1.5rem 2rem;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  position: relative;
}

.feedback-form-wrapper h3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8, #3b82f6);
}

.feedback-form {
  padding: 2rem;
}

.feedback-form .form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.feedback-form .form-group:last-child {
  margin-bottom: 0;
}

.feedback-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #1f2937;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.required {
  color: #ef4444;
  margin-left: 3px;
  font-weight: bold;
}

.feedback-form .form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: "Gilroy", Arial, sans-serif;
  transition: all 0.3s ease;
  box-sizing: border-box;
  background-color: #fff;
  color: #1f2937;
}

.feedback-form .form-control::placeholder {
  color: #6b7280;
  opacity: 0.8;
}

.feedback-form .form-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background-color: #fff;
}

.feedback-form .form-control:hover {
  border-color: #9ca3af;
}

/* Validation states */
.feedback-form .form-control.field-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.feedback-form .form-control.field-valid {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.feedback-form .form-control.field-error:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.feedback-form .form-control.field-valid:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Error message */
.field-error-message {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: block;
  font-weight: 500;
}

/* Textarea specific styles */
.feedback-form textarea.form-control {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

/* Button styles - в стиле materials.css */
.feedback-form .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Gilroy", Arial, sans-serif;
  text-decoration: none;
  transition: all 0.3s ease;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.feedback-form .btn-primary,
.feedback-modal-trigger {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.feedback-form .btn-primary:hover,
.feedback-modal-trigger:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(16, 185, 129, 0.3);
}

.feedback-form .btn-primary:active,
.feedback-modal-trigger:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.feedback-form .btn-primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Кнопка-триггер модального окна */
.feedback-modal-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.75rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Modal styles - в стиле materials.css */
.feedback-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  font-family: "Gilroy", Arial, sans-serif;
}

.feedback-modal[style*="block"] {
  opacity: 1;
  visibility: visible;
}

.feedback-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.feedback-modal-content {
  background: white;
  border-radius: 0.75rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 2px solid #e5e7eb;
  transform: scale(0.8) translateY(20px);
  transition: all 0.3s ease;
}

.feedback-modal[style*="block"] .feedback-modal-content {
  transform: scale(1) translateY(0);
}

.feedback-modal-header {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 0.75rem 0.75rem 0 0;
  position: relative;
}

.feedback-modal-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8, #3b82f6);
}

.feedback-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.feedback-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: white;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.feedback-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.feedback-modal-body {
  padding: 0;
}

.feedback-modal-body .feedback-form-wrapper {
  border: none;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
}

.feedback-modal-body .feedback-form-wrapper:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.feedback-modal-body .feedback-form-wrapper h3 {
  display: none;
}

/* Alert styles - в стиле materials.css */
.alert {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0.75rem;
  border: 2px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.alert::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.alert-success {
  background: #f0fdf4;
  border-color: #10b981;
  color: #047857;
}

.alert-success::before {
  background: linear-gradient(90deg, #10b981, #059669, #10b981);
}

.alert-error {
  background: #fef2f2;
  border-color: #ef4444;
  color: #dc2626;
}

.alert-error::before {
  background: linear-gradient(90deg, #ef4444, #dc2626, #ef4444);
}

/* Стили для полей с иконками */
.form-group.has-icon {
  position: relative;
}

.form-group.has-icon .form-control {
  padding-left: 3rem;
}

.form-group.has-icon::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 2.25rem;
  width: 1.25rem;
  height: 1.25rem;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.5;
  z-index: 1;
}

/* Адаптивные стили */
@media (max-width: 768px) {
  .feedback-modal-overlay {
    padding: 15px;
  }

  .feedback-modal-content {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .feedback-modal-header {
    padding: 1.25rem 1.5rem;
  }

  .feedback-modal-header h3 {
    font-size: 1.125rem;
  }

  .feedback-form {
    padding: 1.5rem;
  }

  .feedback-form-wrapper h3 {
    padding: 1.25rem 1.5rem;
    font-size: 1.125rem;
  }

  .feedback-form .btn {
    padding: 0.875rem 1.5rem;
  }

  .feedback-modal-trigger {
    padding: 0.875rem 1.5rem;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .feedback-form {
    padding: 1rem;
  }

  .feedback-form-wrapper h3 {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }

  .feedback-modal-header {
    padding: 1rem 1.25rem;
  }

  .feedback-modal-header h3 {
    font-size: 1rem;
  }

  .feedback-form .form-control {
    padding: 0.625rem 0.875rem;
  }
}

/* Стили для загрузки */
.feedback-form .btn-primary.loading {
  position: relative;
  color: transparent;
}

.feedback-form .btn-primary.loading:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Анимация для модального окна */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.feedback-modal[style*="block"] .feedback-modal-content {
  animation: modalFadeIn 0.3s ease-out;
}

/* Интеграция с цветовой схемой materials.css */
.mod-feedback {
  --primary-color: #1e40af;
  --primary-light: #3b82f6;
  --success-color: #10b981;
  --success-dark: #059669;
  --error-color: #ef4444;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --border-color: #e5e7eb;
}

/* Дополнительные эффекты */
.feedback-form .form-control:focus + .form-icon {
  color: var(--primary-light);
}

.feedback-form-wrapper {
  position: relative;
  overflow: hidden;
}

.feedback-form-wrapper::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.03), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.feedback-form-wrapper:hover::after {
  opacity: 1;
  animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}
