/* ================================================================
 * DS 资源举报系统 v7.7.4
 * 全部 ds- 前缀 / box-sizing 全 reset
 * ================================================================ */

.ds-report-btn,
.ds-report-btn * {
  box-sizing: border-box;
}

/* ================================================================
 * 1. 举报按钮(置于资源操作区)
 * ================================================================ */
.ds-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: #888;
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  line-height: 1;
  user-select: none;
}

.ds-report-btn:hover {
  color: #e54d42;
  border-color: #e54d42;
  background: #fff5f4;
}

.ds-report-btn:active {
  transform: scale(0.97);
}

.ds-report-btn svg {
  display: block;
}

.ds-report-count {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  color: #fff;
  background: #e54d42;
  border-radius: 9px;
}

.ds-report-btn-done,
.ds-report-btn:disabled {
  color: #4caf50 !important;
  border-color: #c8e6c9 !important;
  background: #f1f8e9 !important;
  cursor: not-allowed;
  opacity: 0.85;
}

.ds-report-btn-done:hover,
.ds-report-btn:disabled:hover {
  color: #4caf50 !important;
  background: #f1f8e9 !important;
}

/* ================================================================
 * 2. 弹窗
 * ================================================================ */
.ds-report-modal,
.ds-report-modal * {
  box-sizing: border-box;
}

.ds-report-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s;
}

.ds-report-modal.ds-report-modal-show {
  opacity: 1;
}

.ds-report-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.ds-report-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 22px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.2s;
}

.ds-report-modal.ds-report-modal-show .ds-report-box {
  transform: translateY(0) scale(1);
}

.ds-report-box h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

.ds-report-tip {
  margin: 0 0 16px;
  font-size: 13px;
  color: #888;
}

.ds-report-reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.ds-report-reason {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: #333;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.ds-report-reason:hover {
  background: #f0f7ff;
  border-color: #b3d8ff;
}

.ds-report-reason input[type="radio"] {
  margin: 0;
  cursor: pointer;
  accent-color: #3a8ee6;
}

.ds-report-reason input[type="radio"]:checked + span {
  color: #3a8ee6;
  font-weight: 600;
}

.ds-report-desc {
  display: block;
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  color: #333;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  resize: vertical;
  margin-bottom: 14px;
  transition: border-color 0.15s;
}

.ds-report-desc:focus {
  outline: none;
  border-color: #3a8ee6;
  background: #fff;
}

.ds-report-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ds-report-actions .ds-btn {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  line-height: 1.2;
}

.ds-report-actions .ds-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ds-report-actions .ds-btn-ghost {
  color: #666;
  background: #f5f5f5;
  border-color: #e5e7eb;
}

.ds-report-actions .ds-btn-ghost:hover {
  color: #333;
  background: #ebebeb;
}

.ds-report-actions .ds-btn-primary {
  color: #fff;
  background: #3a8ee6;
  border-color: #3a8ee6;
}

.ds-report-actions .ds-btn-primary:hover {
  background: #2d7dd2;
  border-color: #2d7dd2;
}

.ds-report-msg {
  margin-top: 10px;
  font-size: 13px;
  min-height: 18px;
  line-height: 1.4;
}

.ds-report-msg-error {
  color: #e54d42;
}

.ds-report-msg-success {
  color: #4caf50;
}

/* ================================================================
 * 3. Toast
 * ================================================================ */
.ds-report-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100000;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: all 0.25s;
  pointer-events: none;
  white-space: nowrap;
}

.ds-report-toast-show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.ds-report-toast-success {
  background: rgba(76, 175, 80, 0.95);
}

.ds-report-toast-error {
  background: rgba(229, 77, 66, 0.95);
}

/* ================================================================
 * 4. 暗色模式(可选,跟随系统)
 * ================================================================ */
@media (prefers-color-scheme: dark) {
  .ds-report-btn {
    color: #aaa;
    background: #2a2a2a;
    border-color: #3a3a3a;
  }
  .ds-report-btn:hover {
    color: #ff7875;
    border-color: #ff7875;
    background: #2a1f1f;
  }
  .ds-report-box {
    background: #1f1f1f;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  }
  .ds-report-box h3 {
    color: #f0f0f0;
  }
  .ds-report-tip {
    color: #888;
  }
  .ds-report-reason {
    color: #ccc;
    background: #2a2a2a;
    border-color: #3a3a3a;
  }
  .ds-report-reason:hover {
    background: #1f2a3a;
    border-color: #2d5d8a;
  }
  .ds-report-desc {
    color: #ccc;
    background: #2a2a2a;
    border-color: #3a3a3a;
  }
  .ds-report-desc:focus {
    border-color: #3a8ee6;
    background: #1f1f1f;
  }
  .ds-report-actions .ds-btn-ghost {
    color: #aaa;
    background: #2a2a2a;
    border-color: #3a3a3a;
  }
  .ds-report-actions .ds-btn-ghost:hover {
    color: #fff;
    background: #3a3a3a;
  }
}

/* ================================================================
 * 5. 响应式
 * ================================================================ */
@media (max-width: 480px) {
  .ds-report-box {
    padding: 20px 16px 16px;
  }
  .ds-report-reason {
    padding: 9px 10px;
    font-size: 13px;
  }
  .ds-report-actions .ds-btn {
    padding: 7px 14px;
    font-size: 13px;
  }
}
