/* Product tables only. Base styles and other page templates are unchanged. */
.content-cols.ce-content-cols.mf-product-details {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    align-items: start;
    gap: 32px;
    margin: 0;
}

.content-cols.ce-content-cols.mf-product-details > div {
    min-width: 0;
    max-width: 100%;
    margin: 10px 0;
    overflow: visible;
}

.content-cols.ce-content-cols.mf-product-details > div:only-child {
    grid-column: 1 / -1;
}

.mf-product-hero .ce-col-l,
[data-mf-product-tables] {
    min-width: 0;
    max-width: 100%;
}

/* Safe fallback before JS and when scripts are disabled. */
[data-mf-product-tables] {
    /* Prevent the legacy display:table page shell from using table min-content
       width to stretch the whole document on a narrow screen. */
    contain: inline-size;
    overflow-x: auto;
    overflow-wrap: normal;
    word-break: normal;
}

[data-mf-product-tables].mf-product-tables-ready {
    overflow: visible;
}

/* The existing Common.js wraps table.table too. Neutralize only those
   wrappers inside our two product fields; the dedicated scroller owns overflow. */
[data-mf-product-tables].mf-product-tables-ready .table-scroll-wrap,
[data-mf-product-tables].mf-product-tables-ready .table-scroll-wrap > div {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    overflow: visible;
    box-sizing: border-box;
}

[data-mf-product-tables] .mf-product-table-shell {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 16px 0;
    box-sizing: border-box;
}

[data-mf-product-tables] .mf-product-table-scroll {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

[data-mf-product-tables] .mf-product-table-scroll:focus-visible {
    outline: 2px solid #008d36;
    outline-offset: 3px;
}

/* !important is limited to properties often written inline by the editor. */
[data-mf-product-tables] table {
    display: table;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    table-layout: auto !important;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 16px 0 !important;
    float: none !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    font-weight: 400;
    word-break: normal !important;
    overflow-wrap: normal !important;
    white-space: normal !important;
    hyphens: none;
    -webkit-hyphens: none;
}

[data-mf-product-tables] .mf-product-table-scroll table {
    margin: 0 !important;
}

[data-mf-product-tables] table col,
[data-mf-product-tables] table colgroup {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
}

[data-mf-product-tables] table thead,
[data-mf-product-tables] table tbody,
[data-mf-product-tables] table tfoot,
[data-mf-product-tables] table tr {
    height: auto !important;
    min-height: 0 !important;
}

[data-mf-product-tables] table th,
[data-mf-product-tables] table td {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 7px 10px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    vertical-align: top;
    word-break: normal !important;
    overflow-wrap: normal !important;
    white-space: normal !important;
    hyphens: none;
    -webkit-hyphens: none;
    box-sizing: border-box;
}

[data-mf-product-tables] table th {
    font-weight: 600;
}

/* Cancel oversized paragraphs/spans without deleting meaningful line breaks. */
[data-mf-product-tables] table p,
[data-mf-product-tables] table div,
[data-mf-product-tables] table ul,
[data-mf-product-tables] table ol {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
}

[data-mf-product-tables] table p,
[data-mf-product-tables] table div,
[data-mf-product-tables] table span,
[data-mf-product-tables] table font,
[data-mf-product-tables] table strong,
[data-mf-product-tables] table b,
[data-mf-product-tables] table em,
[data-mf-product-tables] table a,
[data-mf-product-tables] table li {
    font-size: inherit !important;
    line-height: inherit !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    white-space: inherit !important;
}

[data-mf-product-tables] table sup,
[data-mf-product-tables] table sub {
    font-size: 0.75em;
    line-height: 0;
}

[data-mf-product-tables] table .mf-table-empty-block {
    display: none !important;
}

[data-mf-product-tables] table .mf-table-number,
[data-mf-product-tables] table .mf-table-numeric-cell {
    white-space: nowrap !important;
}

/* Logical first column is marked in JS with rowspan/colspan taken into account. */
/* Three-column technical tables stay legible instead of becoming very tall. */
[data-mf-product-tables="technical"] table[data-mf-table-columns="3"] {
    min-width: 600px !important;
}

[data-mf-product-tables="technical"] table .mf-table-label-cell {
    width: 47% !important;
    min-width: 175px !important;
}

[data-mf-product-tables="technical"] table.mf-product-table--wide .mf-table-label-cell {
    width: 33% !important;
    min-width: 185px !important;
}

[data-mf-product-tables="summary"] table {
    color: inherit !important;
    background: transparent !important;
}

[data-mf-product-tables="summary"] table th,
[data-mf-product-tables="summary"] table td {
    color: inherit !important;
    background: transparent !important;
    padding: 6px 8px !important;
}

.ce-col-l-white [data-mf-product-tables="summary"] table,
.ce-col-l-white [data-mf-product-tables="summary"] table th,
.ce-col-l-white [data-mf-product-tables="summary"] table td {
    border-color: rgba(255, 255, 255, 0.35);
}

[data-mf-product-tables] .mf-product-table-hint {
    margin: 0 0 6px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: inherit;
}

[data-mf-product-tables] .mf-product-table-hint[hidden] {
    display: none !important;
}

/* Do not squeeze a multi-variant table into half a tablet screen. */
@media (max-width: 1279px) {
    .content-cols.ce-content-cols.mf-product-details.mf-product-details--wide {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1100px) {
    .content-cols.ce-content-cols.mf-product-details {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    [data-mf-product-tables] table th,
    [data-mf-product-tables] table td {
        padding: 6px 8px !important;
    }
}
