/* ============ OVERLAY ============ */
#ductamFeedbackModal.ductam-feedback-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  padding: 15px;
  display: none;
}

#ductamFeedbackModal.ductam-feedback-modal.active {
  display: flex !important;
}

/* ============ MODAL BOX ============ */
#ductamFeedbackModal .modal-box {
  background: #fff;
  width: 100%;
  max-width: 420px;
  border-radius: 8px;
  padding: 20px 25px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: ductamFadeIn 0.3s ease;
  text-align: center;
  max-height: calc(110vh - 30px);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Close button */
#ductamFeedbackModal .modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  line-height: 1;
  z-index: 10;
  background: none;
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ductamFeedbackModal .modal-close:hover {
  color: #000;
  background: #f0f0f0;
  border-radius: 50%;
}

/* Logo */
#ductamFeedbackModal .modal-logo {
  width: 120px;
  margin: 0 auto 12px;
  display: block;
  max-width: 100%;
  height: auto;
}

/* Title */
#ductamFeedbackModal .modal-title {
  color: #0060ae;
  font-size: 16px;
  margin: 8px 0 12px;
  font-weight: bold;
  line-height: 1.4;
}

/* Description */
#ductamFeedbackModal .modal-desc {
  font-size: 13px;
  line-height: 1.4;
  color: #555;
  margin-bottom: 18px;
  text-align: center;
}

/* FORM */
#ductamFeedbackModal .modal-form {
  text-align: left;
}

/* Section labels */
#ductamFeedbackModal .section-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
  color: #333;
}

#ductamFeedbackModal .form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

/* Trường email full width */
#ductamFeedbackModal .form-row.email-row {
  flex-direction: column;
}

#ductamFeedbackModal .form-row.email-row input {
  width: 100% !important;
}

#ductamFeedbackModal .modal-form input,
#ductamFeedbackModal .modal-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.3s;
  background: #fff;
}

#ductamFeedbackModal .modal-form input:focus,
#ductamFeedbackModal .modal-form textarea:focus {
  outline: none;
  border-color: #0060ae;
  box-shadow: 0 0 0 2px rgba(0, 96, 174, 0.1);
}

#ductamFeedbackModal .modal-form textarea {
  min-height: 100px;
  resize: vertical;
  margin-top: 8px;
  margin-bottom: 8px;
}

/* Feedback type selector */
#ductamFeedbackModal .feedback-type-selector {
  margin-bottom: 12px;
}

#ductamFeedbackModal .type-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#ductamFeedbackModal .type-options label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 3px;
  background: #f5f5f5;
  transition: background 0.2s;
}

#ductamFeedbackModal .type-options label:hover {
  background: #e8e8e8;
}

/* Rating section */
#ductamFeedbackModal .rating-section {
  margin-bottom: 12px;
}

#ductamFeedbackModal .rating-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 8px;
  justify-content: center;
}

#ductamFeedbackModal .rating-stars .star {
  font-size: 20px;
  cursor: pointer;
  color: #ddd;
  transition: color 0.2s;
  line-height: 1;
}

#ductamFeedbackModal .rating-stars .star:hover,
#ductamFeedbackModal .rating-stars .star.active {
  color: #ffd700;
}

/* CAPTCHA */
#ductamFeedbackModal .captcha-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ddd;
  padding: 10px 12px;
  border-radius: 4px;
  margin: 15px 0;
  background: #f9f9f9;
  font-size: 13px;
  cursor: pointer;
}

#ductamFeedbackModal .captcha-box:hover {
  background: #f0f0f0;
}

#ductamFeedbackModal .captcha-box input[type="checkbox"] {
  width: auto;
  margin: 0;
}

#ductamFeedbackModal .captcha-logo {
  width: 32px;
  margin-left: auto;
}

/* Submit Button */
#ductamFeedbackModal .submit-btn {
  width: 100%;
  background: #0076d6;
  color: #fff;
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  position: relative;
}

#ductamFeedbackModal .submit-btn:hover {
  background: #0060ae;
}

#ductamFeedbackModal .submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ============ MESSAGES STYLES ============ */
#ductamFeedbackModal #feedback-message {
  margin: 12px 0 8px;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  display: none;
  line-height: 1.4;
  animation: ductamSlideIn 0.3s ease;
}

#ductamFeedbackModal #feedback-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

#ductamFeedbackModal #feedback-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

#ductamFeedbackModal #feedback-message.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
  display: block;
}

/* Input error state */
#ductamFeedbackModal .input-error {
  border-color: #dc3545 !important;
  animation: ductamShake 0.3s ease;
}

/* Animations */
@keyframes ductamFadeIn {
  from {
    opacity: 0;
    transform: translateY(-15px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ductamSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ductamShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}

@keyframes ductamSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#ductamFeedbackModal .loading-spinner {
  display: inline-block;
  animation: ductamSpin 1s linear infinite;
}

/* Responsive - Smaller adjustments */
@media (max-width: 480px) {
  #ductamFeedbackModal.ductam-feedback-modal {
    padding: 10px;
  }

  #ductamFeedbackModal .modal-box {
    max-width: 100%;
    padding: 18px 20px;
    max-height: calc(100vh - 20px);
  }

  #ductamFeedbackModal .modal-logo {
    width: 100px;
  }

  #ductamFeedbackModal .modal-title {
    font-size: 15px;
  }

  #ductamFeedbackModal .modal-desc {
    font-size: 12px;
    line-height: 1.3;
  }

  #ductamFeedbackModal .form-row {
    flex-direction: column;
    gap: 8px;
  }

  #ductamFeedbackModal .type-options {
    justify-content: center;
  }

  #ductamFeedbackModal .type-options label {
    font-size: 11px;
    padding: 3px 5px;
  }

  #ductamFeedbackModal .modal-form input,
  #ductamFeedbackModal .modal-form textarea {
    padding: 8px 10px;
    font-size: 12px;
  }

  #ductamFeedbackModal textarea {
    min-height: 90px;
  }

  #ductamFeedbackModal .captcha-box {
    padding: 8px 10px;
    font-size: 12px;
  }

  #ductamFeedbackModal .captcha-logo {
    width: 28px;
  }

  #ductamFeedbackModal .submit-btn {
    padding: 10px;
    font-size: 13px;
  }

  #ductamFeedbackModal .rating-stars .star {
    font-size: 18px;
  }
}

/* Body lock when modal open */
body.ductam-modal-open {
  overflow: hidden !important;
}

/* Feedback trigger button styles */
.ductam-feedback-trigger {
  cursor: pointer;
}

.ductam-feedback-button {
  background: #0060ae;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.ductam-feedback-button:hover {
  background: #004d8c;
}
