.price-matrix-actions,.price-matrix-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.price-matrix-actions{justify-content:flex-end;flex-shrink:0}.price-matrix-toolbar{margin:18px 0}.price-matrix-toolbar input{flex:1;min-width:180px}.price-matrix-toolbar span{color:var(--adm-muted,#79869a);font-size:13px}
#portalModal:has(.price-matrix-dialog) .portal-dialog{width:min(1440px,96vw);max-width:1440px;padding:26px}.price-matrix-dialog table{min-width:960px;table-layout:fixed}.price-matrix-dialog th:first-child{width:24%}.price-matrix-dialog th:last-child{width:14%}.price-matrix-dialog td{vertical-align:top;overflow-wrap:anywhere}.price-matrix-dialog small{display:block;font-size:12px;line-height:1.5;color:var(--adm-muted,#7b879a);margin-top:5px}.price-matrix-dialog .admin-table-scroll{max-height:none!important;overflow-x:auto;overflow-y:visible}.price-matrix-dialog th{position:static}.price-matrix-dialog td button{display:block;margin-top:10px}.matrix-best{color:#25845d!important;font-weight:700}.matrix-higher{color:#c34254!important}.matrix-muted,.price-matrix-missing{color:#8b94a2!important}[data-theme=dark] .matrix-best{color:#79d9ad!important}[data-theme=dark] .matrix-higher{color:#ff96a4!important}@media(max-width:600px){#portalModal:has(.price-matrix-dialog) .portal-dialog{padding:18px}.price-matrix-actions{justify-content:flex-start}}
/* Keep the close control and filters outside the one scrolling table region. */
#portalModal:has(.price-matrix-dialog) .portal-dialog{height:min(860px,88dvh);max-height:88dvh;overflow:hidden;display:flex;flex-direction:column;scrollbar-gutter:auto;box-sizing:border-box}
#portalModal:has(.price-matrix-dialog) #portalModalBody{display:flex;flex:1;min-height:0;overflow:hidden}
.price-matrix-dialog{display:flex;flex-direction:column;min-height:0;min-width:0;width:100%}
.price-matrix-header{flex:none;padding-right:28px}.price-matrix-header h3{margin-top:0}.price-matrix-header p{margin-bottom:12px}.price-matrix-toolbar{margin:10px 0 14px}
#priceMatrixTable{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;border:1px solid var(--adm-line,#e3e9f1);border-radius:10px;scrollbar-gutter:stable}
#priceMatrixTable>.portal-table-wrap{overflow:visible}#priceMatrixTable th{position:sticky;top:0;z-index:2;background:var(--adm-surface-soft,#f7f9fc)}
#portalModal:has(.price-matrix-dialog) .dialog-x{z-index:5;background:var(--adm-surface-soft,#f4f7fd)}
@media(max-width:600px){#portalModal:has(.price-matrix-dialog) .portal-dialog{height:88dvh}.price-matrix-header{padding-right:0}.price-matrix-header h3{padding-right:38px}.price-matrix-header p{font-size:12px;line-height:1.5}}

.price-matrix-modes{display:flex;gap:4px;flex-shrink:0;padding:3px;background:var(--adm-surface-soft,#f3f6fb);border-radius:10px}.price-matrix-modes button[aria-pressed="true"]{background:var(--adm-blue-soft,#e8efff);border-color:var(--adm-blue,#4169d4);color:var(--adm-blue,#4169d4);font-weight:700}
#priceMatrixTable table{min-width:1240px}#priceMatrixTable th:first-child{width:40px}#priceMatrixTable th:nth-child(2){width:23%}#priceMatrixTable th:nth-child(3){width:13%}#priceMatrixTable th:last-child{width:100px}#priceMatrixTable input[type=checkbox],#priceMatrixTable input[type=radio]{width:18px;height:18px;accent-color:#4169d4}.matrix-detail{padding:18px}.matrix-detail h3{margin-top:18px}.matrix-detail .portal-table-wrap{overflow:visible}.matrix-detail table{min-width:850px!important;table-layout:auto}.matrix-detail th:first-child{width:auto!important}.matrix-current-price{font-weight:700;font-size:16px;color:var(--adm-blue,#4169d4);margin-top:7px}#matrixApplyError{color:#c34254}

#priceMatrixTable .matrix-review-note{color:#ad7008!important;font-weight:600}

#priceMatrixTable .matrix-warning{color:#ad7008!important}

/* The route selector stays above the unchanged comparison list. */
.matrix-route-dialog{width:min(1080px,calc(100vw - 32px));max-height:88dvh;padding:0;overflow:hidden;box-sizing:border-box;background:var(--adm-surface,#fff);color:var(--text,#202630)}
.matrix-route-dialog[open]{display:flex;flex-direction:column}
.matrix-route-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 24px 16px;border-bottom:1px solid var(--adm-line,#e3e9f1);flex:none}
.matrix-route-dialog .matrix-route-header h3{margin:0;font-size:22px}.matrix-route-header p{margin:6px 0 0;font-size:13px}
.matrix-route-dialog .matrix-route-close{flex:none;width:38px;height:38px;padding:0;font-size:27px;line-height:1;background:var(--adm-surface-soft,#f5f8ff)}
.matrix-route-body{min-height:0;overflow:auto;padding:16px 24px;overscroll-behavior:contain}.matrix-route-body h4{font-size:18px;margin:0 0 12px}.matrix-route-body>p{font-size:13px;margin:10px 0}
.matrix-route-body .portal-table-wrap{overflow:visible}.matrix-route-body table{min-width:720px;width:100%;border-collapse:collapse;table-layout:auto}.matrix-route-body th{position:sticky;top:-16px;background:var(--adm-surface-soft,#f7f9fc);z-index:1;text-align:left}.matrix-route-body td,.matrix-route-body th{padding:12px;border-bottom:1px solid var(--adm-line,#e3e9f1);vertical-align:top}.matrix-route-body td:nth-child(2){min-width:230px}.matrix-route-body small{display:block;font-size:12px;color:var(--adm-muted,#718096);line-height:1.5;margin-top:5px}.matrix-route-body input[type=radio]{width:18px;height:18px;accent-color:#4169d4}
.matrix-route-footer{flex:none;padding:14px 24px;border-top:1px solid var(--adm-line,#e3e9f1);max-height:42dvh;overflow:auto;background:var(--adm-surface,#fff)}.matrix-route-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}.matrix-route-dialog .matrix-review-note{color:#ad7008!important}.matrix-route-dialog #matrixApplyError{color:#c34254}.matrix-route-dialog button:disabled{opacity:.55;cursor:wait}
@media(max-width:600px){.matrix-route-dialog{width:calc(100vw - 20px);max-height:90dvh;border-radius:14px}.matrix-route-header{padding:16px}.matrix-route-dialog .matrix-route-header h3{font-size:19px}.matrix-route-body{padding:14px 16px}.matrix-route-footer{padding:12px 16px}.matrix-route-body table{min-width:680px}}

.matrix-route-confirm{width:min(520px,calc(100vw - 32px));max-height:82dvh;box-sizing:border-box;overflow:auto;background:var(--adm-surface,#fff);color:var(--text,#202630)}.matrix-route-confirm p{overflow-wrap:anywhere;font-size:14px}.matrix-route-confirm .matrix-confirm-product{font-weight:700;color:inherit}.matrix-route-confirm .matrix-review-note{color:#ad7008!important}.matrix-route-confirm #matrixApplyError{color:#c34254}.matrix-route-confirm .matrix-confirm-actions{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:12px}.matrix-route-confirm .matrix-confirm-actions button{flex:none;min-width:72px;height:auto}.matrix-route-confirm button:disabled{opacity:.55;cursor:wait}

.matrix-route-dialog,.matrix-route-confirm,.matrix-route-footer{background:var(--dialog-surface,#fff);color:var(--dialog-text,#202630)}
.matrix-route-header,.matrix-route-footer,.matrix-route-body td,.matrix-route-body th{border-color:var(--dialog-line,#e3e9f1)}
.matrix-route-body th,.matrix-route-dialog .matrix-route-close{background:var(--dialog-soft,#f7f9fc)}
.matrix-route-body small{color:var(--dialog-muted,#718096)}
.matrix-warning{color:#ad7008!important}
html[data-theme=dark] :is(.matrix-route-dialog,.matrix-route-confirm) .matrix-warning,html[data-theme=dark] :is(.matrix-route-dialog,.matrix-route-confirm) .matrix-review-note{color:#eebf68!important}
