/* ========================================
   FEEDBACK FORM STYLES
   ======================================== */

/* Modal backdrop */
.feedback-modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  animation: fadeIn 0.3s ease-in;
}

.feedback-modal-backdrop.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal window */
.feedback-modal {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  padding: 30px;
  padding-top: 45px;
  animation: slideUp 0.3s ease-out;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

/* Modal header */
.feedback-modal__header {
  margin-bottom: 25px;
}

.feedback-modal__title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin: 0;
  line-height: 1.2;
}

.feedback-modal__description {
  font-size: 14px;
  color: #666;
  margin: 8px 0 0 0;
}

/* Close button */
.feedback-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: #f0f0f0;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  flex-shrink: 0;
  transform-origin: center center;
  padding: 0 0 7px !important;
}

.feedback-modal__close:hover {
  background-color: #e0e0e0;
  color: #333;
}

.feedback-modal__close:active {
  /*transform: scale(0.95);*/
}

/* Form */
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Form group */
.feedback-form__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-form__label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.feedback-form__label .required {
  color: #dc3545;
  margin-left: 3px;
}

/* Input fields */
.feedback-form__input,
.feedback-form__textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-form__input:focus,
.feedback-form__textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.feedback-form__input:disabled,
.feedback-form__textarea:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

/* Textarea */
.feedback-form__textarea {
  resize: vertical;
  min-height: 50px;
  max-height: 100px;
}
.feedback-form__group input[type=text], .feedback-form__group input[type=tel] {
    padding: 8px;
}
/* Input error state */
.feedback-form__input.error,
.feedback-form__textarea.error {
  border-color: #dc3545;
  background-color: #fff5f5;
}

.feedback-form__input.error:focus,
.feedback-form__textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Error message */
.feedback-form__error {
  font-size: 12px;
  color: #dc3545;
  margin-top: -5px;
  display: none;
}

.feedback-form__error.show {
  display: block;
}

/* Messages */
.feedback-message {
  padding: 12px 15px;
  border-radius: 4px;
  font-size: 14px;
  margin: 0 0 15px 0;
  animation: slideDown 0.3s ease-out;
}

.feedback-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.feedback-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Submit button */
.feedback-form__submit {
  padding: 12px 24px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  margin-top: 10px;
}

.feedback-form__submit:hover:not(:disabled) {
  background-color: #0056b3;
  
}

.feedback-form__submit:active:not(:disabled) {
  
}

.feedback-form__submit:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Loading state */
.feedback-form__submit.loading {
  position: relative;
  color: transparent;
}

.feedback-form__submit.loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  top: 50%;
  left: 50%;
  margin-left: -7px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Character counter */
.feedback-form__counter {
  font-size: 12px;
  color: #999;
  text-align: right;
  margin-top: -5px;
}

.feedback-form__counter.warning {
  color: #ff9800;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .feedback-modal {
    width: 95%;
    padding: 20px;
  }

  .feedback-modal__title {
    font-size: 20px;
  }

  .feedback-form {
    gap: 15px;
  }

  .feedback-form__input,
  .feedback-form__textarea {
    font-size: 16px;
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .feedback-modal {
    width: 100%;
    border-radius: 8px 8px 0 0;
    max-height: 95vh;
  }

  .feedback-modal__close {
    top: 10px;
    right: 10px;
  }

  .feedback-modal__title {
    font-size: 18px;
  }

  .feedback-form__input,
  .feedback-form__textarea {
    font-size: 16px;
  }
}
