/* ESL Parameters Frontend Styles */
/* 兼容原有的独立显示方式和新的tab显示方式 */

/* 原有的独立显示样式（保留兼容性） */
.esl-parameters-display {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 30px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

.esl-parameters-display .esl-section-title {
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #0095ff 0%, #0064ff 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid #e5e5e5;
}

/* Tab显示的样式（新增） */
.esl-parameters-tab-display {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* 通用表格样式 */
.esl-specs-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.esl-specs-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    font-weight: 600;
    padding: 15px 20px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
}

.esl-specs-table th:first-child {
    width: 40%;
    border-right: 1px solid #dee2e6;
}

.esl-specs-table td {
    padding: 12px 20px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    line-height: 1.5;
    vertical-align: top;
}

.spec-name-cell {
    font-weight: 500;
    color: #495057;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    width: 40%;
}

.spec-value-cell {
    color: #212529;
    font-weight: 400;
}

.spec-row:last-child td {
    border-bottom: none;
}

.spec-row:hover td {
    background: #f8f9fa;
}

/* 打印样式 */
@media print {
    .esl-parameter-tabs,
    .esl-parameters-tab-display .esl-parameter-tabs {
        display: none;
    }

    .esl-parameter-content,
    .esl-parameters-tab-display .esl-parameter-content {
        width: 100% !important;
    }

    .esl-parameter-panel,
    .esl-parameters-tab-display .esl-parameter-panel {
        display: block !important;
    }

    .esl-specs-table {
        border-collapse: collapse;
        border: 1px solid #000;
    }

    .esl-specs-table th,
    .esl-specs-table td {
        border: 1px solid #000;
        background: #fff !important;
        color: #000 !important;
    }

    /* 隐藏装饰性元素 */
    .esl-product-image,
    .esl-product-image-single {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .esl-specs-table {
        border: 2px solid #000;
    }

    .esl-specs-table th {
        background: #000;
        color: #fff;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .esl-parameter-panel,
    .esl-tab-button,
    .esl-product-image,
    .esl-product-image-single {
        transition: none;
        animation: none;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .esl-parameters-display,
    .esl-parameters-tab-display {
        background: #1a1a1a;
        border-color: #333;
    }

    .esl-specs-table {
        background: #1a1a1a;
        border-color: #333;
    }

    .esl-specs-table th {
        background: #2a2a2a;
        color: #e0e0e0;
        border-color: #333;
    }

    .esl-specs-table td {
        border-color: #333;
        color: #e0e0e0;
    }

    .spec-name-cell {
        background: #2a2a2a;
        color: #e0e0e0;
    }
}