/**
 * 评估结果模态框样式
 */

/* 模态框覆盖层 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;
    backdrop-filter: blur(4px);
}

/* 隐藏状态 */
.modal-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 模态框内容 - 使用flex布局确保头部固定 */
.evaluation-result-modal {
    background: white;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
    margin: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0 0 15px 0;
}
.modal-content {
    padding: 0;
}
@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 模态框头部 - 固定不滚动 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #2563eb;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.modal-close:hover {
    background: #f3f4f6;
    color: white;
}

/* 模态框主体 - 可滚动内容区域，固定头部 */
.modal-body {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 加载状态 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 结果内容 */
.result-content {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 结果区块 */
.result-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 12px;
}

/* 信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    color: #6b7280;
    font-size: 14px;
}

.info-value {
    color: #1f2937;
    font-weight: 500;
    font-size: 14px;
}

/* 分析内容 */
.analysis-content {
    line-height: 1.6;
    color: #374151;
}

.analysis-content p {
    margin-bottom: 12px;
}

/* 状态徽章 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.processing {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.pending {
    background: #f3f4f6;
    color: #6b7280;
}

.status-badge.failed {
    background: #fee2e2;
    color: #991b1b;
}

/* 模态框底部 */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding: 15px 24px;
    border-top: 1px solid #e5e7eb;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #2563eb;
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .evaluation-result-modal {
        width: 95%;
        max-height: 85vh;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: row;
        justify-content: flex-end;
        gap: 16px;
    }

    .btn {
        width: auto;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .section-title {
        font-size: 16px;
    }
}
