/* ============================================
   GSX 报告解读插件样式 - 纯表格极简版 v3.3
   与查询结果保持完全一致的表格风格
   ============================================ */

.zaxu-interpretation-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    overflow: hidden;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* 风险等级顶部标识 */
.zaxu-interpretation-container.risk-safe {
    border-top: 3px solid #34c759;
}
.zaxu-interpretation-container.risk-warning {
    border-top: 3px solid #ff9500;
}
.zaxu-interpretation-container.risk-danger {
    border-top: 3px solid #ff3b30;
}

/* 表格主容器 - 与查询结果一致 */
.interpretation-grid {
    display: flex;
    flex-direction: column;
}

/* 表格行 - 与查询结果的info-row一致 */
.interpretation-row {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}
.interpretation-row:hover {
    background: #fafafa;
}
.interpretation-row:last-child {
    border-bottom: none;
}

/* 标签列 - 与查询结果的info-label一致 */
.interpretation-label {
    width: 140px;
    padding: 12px 15px;
    background: #fafafa;
    font-weight: 600;
    color: #555;
    font-size: 12px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid #f0f0f0;
}

/* 值列 - 与查询结果的info-value一致 */
.interpretation-value {
    flex: 1;
    padding: 12px 15px;
    color: #333;
    font-size: 13px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.5;
}

/* 多行内容 */
.interpretation-value.multiline {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* 状态标签 - 简洁版 */
.status-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-tag.safe {
    background: #e8f5e9;
    color: #2e7d32;
}
.status-tag.warning {
    background: #fff3e0;
    color: #ef6c00;
}
.status-tag.danger {
    background: #ffebee;
    color: #c62828;
}

/* 区块分隔行 - 灰色背景区分不同区块 */
.section-divider {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}
.section-divider .interpretation-label {
    background: #f0f0f0;
    color: #333;
    font-weight: 600;
}
.section-divider .interpretation-value {
    font-weight: 500;
    color: #555;
}

/* 建议文字 */
.advice-text {
    color: #1565c0;
    font-size: 12px;
    line-height: 1.5;
    padding: 6px 0;
    width: 100%;
}

/* 列表样式 - 用于购买建议和术语解释 */
.value-list {
    margin: 0;
    padding-left: 18px;
    width: 100%;
}
.value-list li {
    margin: 6px 0;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

/* 术语解释专用样式 */
.term-name {
    font-weight: 600;
    color: #333;
    font-size: 12px;
}
.term-desc {
    color: #666;
    font-size: 12px;
    line-height: 1.5;
}

/* 加载状态 */
.interpretation-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}
.interpretation-loading .spinner {
    width: 32px;
    height: 32px;
    border: 2px solid #f0f0f0;
    border-top-color: #212121;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

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

/* 打印样式 - 确保颜色正确 */
@media print {
    .zaxu-interpretation-container {
        break-inside: avoid;
    }
    
    .interpretation-label {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .section-divider {
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .section-divider .interpretation-label {
        background: #e8e8e8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .status-tag {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .interpretation-loading {
        display: none !important;
    }
}

/* 响应式 */
@media (max-width: 600px) {
    .interpretation-label {
        width: 100px;
        font-size: 11px;
        padding: 10px 12px;
    }
    
    .interpretation-value {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* 打印容器 */
#interpretationForPrint {
    display: none;
    background: #fff;
}

.zaxu-interpretation-print-clone {
    width: 100%;
    max-width: 794px;
    margin: 0 auto;
}