/* 反馈模态框样式 */
.feedback-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  backdrop-filter: blur(1px);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99998;
}

.feedback-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  min-height: 40vh;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 99999;
}

/* 头部 */
.feedback-modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: #fff;
}

.feedback-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.feedback-modal-close {
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #6b7280;
  transition: all 0.2s ease;
  padding: 0;
}

.feedback-modal-close:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

/* 主体内容 */
.feedback-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #fff;
}

/* 文本域相关样式 */
.textarea-group {
  position: relative;
  margin-bottom: 20px;
}

.feedback-textarea {
  width: calc(100% - 2px);
  height: 150px;
  resize: none;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px;
  outline: none;
  overflow-y: auto;
  box-sizing: border-box;
}

.feedback-textarea:focus,
.feedback-textarea:hover {
  border-color: #000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.feedback-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(255, 255, 255, 0.8);
  padding: 0 4px;
  color: #6b7280;
  pointer-events: none;
  z-index: 2;
  font-size: 13px;
}

/* 错误状态样式 */
.textarea-group .feedback-error {
  display: none;
  position: absolute;
  left: 0;
  bottom: -12px;
  color: #ff3838ff;
  font-size: 12px;
}

.textarea-group.required-error .feedback-textarea {
  border-color: #ff3838ff !important;
}

.textarea-group.required-error .feedback-count {
  color: #ff3838ff !important;
}

/* 上传相关样式 */
.feedback-upload-label {
  color: #374151;
  font-size: 14px;
}

.feedback-upload-list {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 80px;
  margin-top: 10px;
}

.feedback-upload-btn {
  width: 100px;
  height: 100px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  cursor: pointer;
  color: #9ca3af;
  font-size: 36px;
  transition: border 0.2s;
}

.feedback-upload-btn:hover {
  border-color: #000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.feedback-upload-thumb {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.remove-img {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  font-size: 12px;
}

.upload-plus {
  font-size: 36px;
  color: #9ca3af;
  user-select: none;
}

/* 底部 */
.feedback-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e5e7eb;
  padding: 16px 24px;
  background: #fff;
  flex-shrink: 0;
}

.feedback-email-tip {
  color: #6b7280;
  font-size: 12px;
}

.feedback-submit-btn {
  min-width: 96px;
  height: 36px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.feedback-submit-btn:disabled {
  background: #a5b4fc;
  cursor: not-allowed;
}

/* 暗色主题样式 */
[data-theme="dark"] {
  .modal-overlay {
    background: rgba(0, 0, 0, 0.6);
  }

  .feedback-modal-content {
    background: #1f2937;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  }

  .feedback-modal-header {
    background: #1f2937;
    border-bottom-color: #374151;
  }

  .feedback-modal-title {
    color: #f9fafb;
  }

  .feedback-modal-close {
    color: #9ca3af;
  }

  .feedback-modal-close:hover {
    background-color: #374151;
    color: #f9fafb;
  }

  .feedback-modal-body {
    background: #1f2937;
  }

  .feedback-textarea {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
  }

  .feedback-textarea:focus,
  .feedback-textarea:hover {
    border-color: #e6e6e6;
    box-shadow: 0 0 0 2px rgba(230, 230, 230, 0.2);
  }

  .feedback-count {
    background: rgba(31, 41, 55, 0);
    color: #9ca3af;
  }

  .feedback-upload-label {
    color: #9ca3af;
  }

  .feedback-upload-btn {
    background: #374151;
    border-color: #4b5563;
    color: #9ca3af;
  }

  .feedback-upload-btn:hover {
    border-color: #e6e6e6;
    color: #f9fafb;
    box-shadow: 0 0 0 2px rgba(230, 230, 230, 0.2);
  }

  .feedback-upload-thumb {
    background: #374151;
    border-color: #4b5563;
  }

  .feedback-modal-footer {
    background: #1f2937;
    border-top-color: #374151;
  }

  .feedback-email-tip {
    color: #9ca3af;
  }

  .feedback-submit-btn:disabled {
    background: #374151;
    color: #9ca3af;
  }
}
