/* 回饋表單Modal樣式 */
.feedback-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.feedback-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.feedback-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: feedbackModalSlideIn 0.3s ease-out;
}

@keyframes feedbackModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Header */
.feedback-modal-header {
  padding: 32px 32px 24px;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
}

.feedback-modal-header h3 {
  margin: 0 0 8px;
  color: #2d3748;
  font-size: 24px;
  font-weight: 600;
}

.feedback-modal-header p {
  margin: 0;
  color: #718096;
  font-size: 16px;
  line-height: 1.5;
}

/* Form Styles */
.feedback-form {
  padding: 24px 32px 32px;
}

.feedback-form-group {
  margin-bottom: 20px;
}

.feedback-form-group label {
  display: block;
  margin-bottom: 8px;
  color: #2d3748;
  font-weight: 500;
  font-size: 14px;
}

.feedback-form-group label.required::after {
  content: " *";
  color: #e53e3e;
}

.feedback-form-group input,
.feedback-form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.feedback-form-group input:focus,
.feedback-form-group textarea:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.feedback-form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.feedback-error {
  margin-top: 6px;
  color: #e53e3e;
  font-size: 14px;
  display: none;
}

/* Privacy Notice */
.feedback-privacy {
  margin: 20px 0;
  padding: 16px;
  background: #f7fafc;
  border-radius: 8px;
  border-left: 4px solid #3182ce;
}

.feedback-privacy small {
  color: #4a5568;
  font-size: 13px;
  line-height: 1.4;
}

/* Form Actions */
.feedback-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.feedback-form-actions .btn {
  flex: 1;
  padding: 14px 24px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
}

.btn-primary {
  background: #3182ce;
  color: white;
  border-color: #3182ce;
}

.btn-primary:hover:not(:disabled) {
  background: #2c5282;
  border-color: #2c5282;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: #4a5568;
  border-color: #e2e8f0;
}

.btn-secondary:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
}

/* Success State */
.feedback-success {
  padding: 40px 32px;
  text-align: center;
}

.success-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: successPulse 0.5s ease-out;
}

@keyframes successPulse {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.feedback-success h4 {
  margin: 0 0 8px;
  color: #2d3748;
  font-size: 20px;
  font-weight: 600;
}

.feedback-success p {
  margin: 0;
  color: #718096;
  font-size: 16px;
  line-height: 1.5;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .feedback-modal-content {
    width: 95%;
    margin: 20px;
    max-height: calc(100vh - 40px);
  }
  
  .feedback-modal-header {
    padding: 24px 20px 20px;
  }
  
  .feedback-modal-header h3 {
    font-size: 20px;
  }
  
  .feedback-form {
    padding: 20px;
  }
  
  .feedback-form-actions {
    flex-direction: column;
  }
  
  .feedback-success {
    padding: 32px 20px;
  }
}

@media (max-width: 480px) {
  .feedback-form-group input,
  .feedback-form-group textarea {
    font-size: 16px; /* 防止 iOS 縮放 */
  }
}

/* 載入狀態動畫 */
.btn-loading {
  animation: btnLoadingSpin 1s linear infinite;
}

@keyframes btnLoadingSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 無障礙支援 */
@media (prefers-reduced-motion: reduce) {
  .feedback-modal-content {
    animation: none;
  }
  
  .success-icon {
    animation: none;
  }
  
  .btn-loading {
    animation: none;
  }
  
  .btn-primary:hover:not(:disabled) {
    transform: none;
  }
}

/* 高對比模式支援 */
@media (prefers-contrast: high) {
  .feedback-modal-backdrop {
    background: rgba(0, 0, 0, 0.8);
  }
  
  .feedback-form-group input,
  .feedback-form-group textarea {
    border-width: 3px;
  }
}