/**
 * 图片审核模块样式
 */

/* 审核按钮基础样式 */
.audit-image-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    z-index: 100;
}

.audit-image-btn:hover:not(:disabled) {
    border-color: #6c757d;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.audit-image-btn:active:not(:disabled) {
    transform: translateY(0);
}

.audit-image-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.audit-image-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.audit-btn-text {
    font-size: 12px;
}

/* 审核中状态 */
.audit-image-btn.audit-loading {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #90caf9;
    color: #1976d2;
}

.audit-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #90caf9;
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: audit-spin 0.8s linear infinite;
}

@keyframes audit-spin {
    to { transform: rotate(360deg); }
}

/* 审核完成状态 */
.audit-image-btn.audit-completed {
    padding-right: 8px;
}

/* 通过状态 */
.audit-image-btn.audit-passed {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #81c784;
    color: #2e7d32;
}

.audit-image-btn.audit-passed:hover:not(:disabled) {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    border-color: #66bb6a;
}

/* 不通过状态 */
.audit-image-btn.audit-failed {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #e57373;
    color: #c62828;
}

.audit-image-btn.audit-failed:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffcdd2 0%, #ef9a9a 100%);
    border-color: #ef5350;
}

/* 警告状态（部分失败）*/
.audit-image-btn.audit-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: #ffb74d;
    color: #e65100;
}

/* 错误状态 */
.audit-image-btn.audit-error {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    border-color: #f06292;
    color: #ad1457;
}

/* 状态图标 */
.audit-status-icon {
    font-size: 14px;
    line-height: 1;
}

/* 审核完成后的按钮可点击查看详情 */
.audit-image-btn.audit-completed {
    cursor: pointer;
}

.audit-image-btn.audit-completed:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* ==================== 审核详情弹窗 ==================== */
.audit-detail-modal {
    z-index: 10001;
}

.audit-detail-modal__content {
    max-width: 560px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.audit-detail-modal .modal__header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.audit-detail-modal .modal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.audit-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* 侵权原因区块 */
.infringement-reasons {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border: 1px solid #ef9a9a;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.infringement-reasons h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #c62828;
}

.infringement-reasons ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #b71c1c;
    line-height: 1.8;
}

.infringement-reasons li {
    margin-bottom: 4px;
    font-weight: 500;
}

.dark-mode .infringement-reasons {
    background: linear-gradient(135deg, #3d1b1b 0%, #4d2020 100%);
    border-color: #c62828;
}

.dark-mode .infringement-reasons h4 {
    color: #ff8a80;
}

.dark-mode .infringement-reasons ul {
    color: #ffcdd2;
}

/* 结果摘要 */
.audit-result-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.audit-summary-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
}

.audit-summary-item.passed {
    background: #e8f5e9;
    border-color: #a5d6a7;
}

.audit-summary-item.failed {
    background: #ffebee;
    border-color: #ef9a9a;
}

.summary-icon {
    font-size: 20px;
}

.summary-label {
    font-size: 13px;
    color: #666;
}

.summary-level {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0,0,0,0.08);
}

.audit-summary-item.passed .summary-level {
    background: #c8e6c9;
    color: #2e7d32;
}

.audit-summary-item.failed .summary-level {
    background: #ffcdd2;
    color: #c62828;
}

/* 详情区块 */
.audit-detail-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audit-detail-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.audit-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fafafa;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.audit-section-header:hover {
    background: #f0f0f0;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.section-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

.section-badge.badge-pass {
    background: #c8e6c9;
    color: #2e7d32;
}

.section-badge.badge-fail {
    background: #ffcdd2;
    color: #c62828;
}

.section-badge.section-badge--detail {
    background: #e3f2fd;
    color: #1976d2;
    cursor: pointer;
}

.section-badge.section-badge--detail:hover {
    background: #bbdefb;
}

.audit-section-content {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    background: white;
}

/* 检测内容列表 */
.detected-items h4,
.audit-recommendations h4,
.audit-analysis h4 {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin: 0 0 8px 0;
}

.detected-items ul,
.audit-recommendations ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.detected-items li,
.audit-recommendations li {
    margin-bottom: 4px;
}

.audit-analysis {
    margin-top: 12px;
}

.audit-analysis p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.no-issues {
    color: #4caf50;
    font-size: 13px;
    margin: 0;
}

.audit-error-info {
    padding: 12px;
    background: #fff3e0;
    border-radius: 6px;
    border-left: 3px solid #ff9800;
}

.error-message {
    margin: 0;
    font-size: 13px;
    color: #e65100;
}

/* 弹窗底部按钮 */
.audit-detail-modal .modal__actions {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color, #e0e0e0);
    display: flex;
    justify-content: flex-end;
}

/* ==================== 深色模式适配 ==================== */
.dark-mode .audit-image-btn {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    border-color: #4d4d4d;
    color: #e0e0e0;
}

.dark-mode .audit-image-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #3d3d3d 0%, #4d4d4d 100%);
    border-color: #5d5d5d;
}

.dark-mode .audit-image-btn.audit-loading {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    border-color: #3949ab;
    color: #90caf9;
}

.dark-mode .audit-image-btn.audit-passed {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    border-color: #43a047;
    color: #a5d6a7;
}

.dark-mode .audit-image-btn.audit-failed {
    background: linear-gradient(135deg, #b71c1c 0%, #c62828 100%);
    border-color: #e53935;
    color: #ffcdd2;
}

.dark-mode .audit-image-btn.audit-completed:hover {
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.dark-mode .audit-detail-modal__content {
    background: #1e1e1e;
    color: #e0e0e0;
}

.dark-mode .audit-section-header {
    background: #2d2d2d;
}

.dark-mode .audit-section-header:hover {
    background: #3d3d3d;
}

.dark-mode .audit-section-content {
    background: #1e1e1e;
    border-top-color: #3d3d3d;
}

.dark-mode .audit-detail-section {
    border-color: #3d3d3d;
}

.dark-mode .audit-summary-item {
    background: #2d2d2d;
    border-color: #3d3d3d;
}

.dark-mode .audit-summary-item.passed {
    background: #1b3d1f;
    border-color: #2e7d32;
}

.dark-mode .audit-summary-item.failed {
    background: #3d1b1b;
    border-color: #c62828;
}

.dark-mode .section-title {
    color: #e0e0e0;
}

.dark-mode .detected-items h4,
.dark-mode .audit-recommendations h4,
.dark-mode .audit-analysis h4 {
    color: #b0b0b0;
}

.dark-mode .detected-items ul,
.dark-mode .audit-recommendations ul,
.dark-mode .audit-analysis p {
    color: #a0a0a0;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 600px) {
    .audit-result-summary {
        flex-direction: column;
    }

    .audit-detail-modal__content {
        width: 95%;
        max-height: 90vh;
    }

    .audit-image-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .audit-btn-text {
        display: none;
    }

    .audit-image-btn.audit-completed .audit-btn-text {
        display: inline;
    }
}
