/* 页眉与帮助弹窗（与 base/modules 中 #3498db、#34495e 体系一致） */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    padding: 24px 26px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(47, 99, 183, 0.14) 0%, rgba(255, 255, 255, 0.92) 48%, rgba(77, 135, 223, 0.1) 100%);
    box-shadow: var(--shadow-card);
}

.page-title {
    margin: 0;
    font-size: 1.9rem;
    color: var(--text-primary);
    text-align: left;
    flex: 1;
    line-height: 1.2;
}

.page-title-sub {
    display: block;
    margin-top: 10px;
    font-size: 0.96rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.button-help {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    font-size: 14px;
    color: #fff;
    font-weight: 600;
    background: linear-gradient(135deg, #2f63b7 0%, #4d87df 100%);
    border: 1px solid rgba(36, 79, 149, 0.2);
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(47, 99, 183, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.button-help:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(47, 99, 183, 0.24);
}

.button-help .help-icon {
    font-weight: bold;
    font-size: 15px;
    line-height: 1;
}

/* 帮助模态框 */
.help-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 28px 24px;
}

.help-modal.is-open {
    display: flex;
}

.help-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.help-modal-dialog {
    position: relative;
    width: 100%;
    max-width: min(1200px, 92vw);
    max-height: min(92vh, 960px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.help-modal-dialog-wide {
    max-width: min(1360px, 96vw);
}

.help-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.help-modal-header h2 {
    margin: 0;
    font-size: 1.35rem;
    color: #2980b9;
}

.help-modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    color: #555;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-modal-close:hover {
    background: #ecf0f1;
}

.help-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    font-size: 15px;
    line-height: 1.65;
    color: #333;
}

.help-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 16px;
    background: #fafafa;
}

.help-card:last-child {
    margin-bottom: 0;
}

.help-card h3 {
    margin: 0 0 10px 0;
    font-size: 17px;
    color: #2c3e50;
}

.help-card p {
    margin: 0 0 8px 0;
}

.help-card p:last-child {
    margin-bottom: 0;
}

.help-card ul {
    margin: 6px 0 0 0;
    padding-left: 1.2em;
}

.help-card li {
    margin-bottom: 6px;
}

.help-note {
    margin-top: 10px !important;
    padding: 10px 12px;
    background: #fff;
    border-left: 4px solid #3498db;
    border-radius: 4px;
    font-size: 14px;
}

.help-modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    background: #fafafa;
    border-radius: 0 0 10px 10px;
}

.help-modal-footer .button {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.standard-size-card {
    background: #ffffff;
}

.standard-size-intro {
    margin-bottom: 14px !important;
    color: #2c3e50;
}

.standard-size-image-wrap {
    overflow: auto;
    border: 1px solid #d9e3ea;
    border-radius: 8px;
    background: #f8fbfd;
    padding: 12px;
}

.standard-size-image {
    display: block;
    width: 100%;
    min-width: 720px;
    height: auto;
    margin: 0 auto;
}

.surface-roughness-card {
    background: #ffffff;
}

.surface-roughness-card h3 {
    margin: 14px 0 8px;
    color: #28476b;
    font-size: 16px;
}

.surface-roughness-wrap {
    margin: 8px 0 14px;
    overflow: hidden;
    border: 1px solid #d8e3f2;
    border-radius: 8px;
    background: #ffffff;
}

.surface-roughness-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
    line-height: 1.25;
}

.surface-roughness-bearing-table {
    min-width: 0;
}

.surface-roughness-table th,
.surface-roughness-table td {
    border: 1px solid #d8e3f2;
    padding: 5px 6px;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.surface-roughness-table th {
    background: #eef4ff;
    color: #1f4e79;
    font-weight: 700;
}

.surface-roughness-table td:first-child {
    text-align: left;
}

.surface-roughness-bearing-table td:first-child,
.surface-roughness-bearing-table td:nth-child(2) {
    text-align: center;
}

/* 联系我们：邮箱纯文本，不使用超链接样式 */
.help-contact-email {
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
    user-select: text;
}

.split-scroll-modal-dialog {
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.split-scroll-modal-body {
    flex: 1;
    display: flex;
    gap: 20px;
    overflow: hidden;
    min-height: 0;
}

.split-scroll-column {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 8px;
}

.split-scroll-column-form {
    flex: 1;
    min-width: 400px;
}

.bearing-type-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.bearing-type-card.is-active {
    border-color: #2f8f6b !important;
    box-shadow: 0 0 0 2px rgba(47, 143, 107, 0.18);
    background: #f7fffb;
}

@media (max-width: 600px) {
    .page-header {
        flex-direction: column;
        padding: 20px 18px;
    }

    .page-header-actions {
        align-self: stretch;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .help-modal {
        padding: 12px;
    }

    .help-modal-dialog {
        max-width: 100%;
        max-height: 94vh;
    }

    .help-modal-dialog-wide {
        max-width: 100%;
    }

    .help-modal-header,
    .help-modal-body,
    .help-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .standard-size-image {
        min-width: 680px;
    }
}

@media (max-width: 900px) {
    .split-scroll-modal-body {
        flex-direction: column;
    }

    .split-scroll-column,
    .split-scroll-column-form {
        min-width: 0;
        max-width: none;
        padding-right: 0;
    }
}
