/*
 * Parametric product table on landing pages (Components/CategoryParametricTable).
 * The table itself is styled by the mock-up classes in maxlinear-pages.css (.mxl-table, .mxl-compare,
 * .mxl-table-tools); this file only adds what the static mock-up did not need: sorting,
 * the filter panel, the disabled compare state, the empty state and product popovers.
 */

/* ---------- Header sort buttons (look like the mock-up's plain header text) ---------- */
.mxl-ptable-sort {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mxl-ptable-sort:focus-visible {
    outline: 2px solid #68A1DC;
    outline-offset: 2px;
}

.mxl-table th[aria-sort] .mxl-ptable-sort::after {
    margin-left: 4px;
    font-size: 9px;
}

.mxl-table th[aria-sort="ascending"] .mxl-ptable-sort::after {
    content: "\25B2";
}

.mxl-table th[aria-sort="descending"] .mxl-ptable-sort::after {
    content: "\25BC";
}

/* ---------- Rows ---------- */
.mxl-compare:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.mxl-compare:disabled:hover {
    background-color: #6C757D;
}

/* "New" pill, as on the site's category tables (Bootstrap badge-success) */
.mxl-table .mxl-ptable-new {
    display: inline-block;
    margin-top: 3px;
    padding: 3px 6px;
    border-radius: 4px;
    background-color: #28A745;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    vertical-align: baseline;
}

.mxl-table a.mxl-table-part:hover {
    text-decoration: none;
}

.mxl-table .mxl-ptable-info {
    display: inline-block;
    cursor: pointer;
}

.mxl-table .mxl-ptable-info:hover,
.mxl-table .mxl-ptable-info:focus {
    color: #68A1DC;
    outline: none;
}

/* Rows that are not linked products (e.g. evaluation kits) */
.mxl-table span.mxl-table-part {
    display: block;
    color: #262B34;
    font-weight: 700;
}

/*
 * Tables without the compare column: the mock-up styles assume compare is the first column
 * and the product is the second, so shift those rules one column to the left.
 */
.mxl-ptable--no-compare .mxl-table th:first-child {
    padding: 17.75px 12px;
}

.mxl-ptable--no-compare .mxl-table td:first-child {
    vertical-align: top;
}

.mxl-ptable--no-compare .mxl-table td:nth-child(2) {
    padding-top: 20.5px;
    padding-bottom: 20.5px;
}

.mxl-ptable-empty {
    margin: 0;
    padding: 24px 12px;
    color: #838181;
    font-size: 14px;
}

.mxl-ptable-empty .mxl-ptable-reset {
    margin-left: 8px;
}

/* ---------- Columns and filters panel ---------- */
.mxl-ptable-filters {
    margin: 8px 0 20px;
    padding: 20px;
    border: 1px solid #DDE1E6;
    background-color: #F7F8FA;
}

.mxl-ptable-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    align-items: start;
    gap: 16px;
}

.mxl-ptable-filter {
    min-width: 0;
    padding: 12px;
    border: 1px solid #DDE1E6;
    background-color: #FFFFFF;
}

.mxl-ptable-filter-head label {
    display: flex;
    align-items: flex-start;
    margin: 0;
    color: #262B34;
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
    cursor: pointer;
}

.mxl-ptable-filter-head input {
    flex: 0 0 auto;
    margin: 2px 8px 0 0;
}

.mxl-ptable-filter.is-filtered {
    border-color: #164BB7;
}

.mxl-ptable-filter.is-filtered .mxl-ptable-filter-head label {
    color: #164BB7;
}

.mxl-ptable-filter-select {
    margin: 8px 0 4px;
    font-size: 12px;
}

.mxl-ptable-filter-select button {
    margin-right: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: #68A1DC;
    cursor: pointer;
}

.mxl-ptable-filter-select button:hover {
    color: #164BB7;
    text-decoration: underline;
}

.mxl-ptable-values {
    max-height: 150px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.mxl-ptable-values label {
    display: flex;
    align-items: flex-start;
    margin: 0;
    padding: 2px 0;
    color: #424B5A;
    font-size: 13px;
    font-weight: 400;
    line-height: 17px;
    cursor: pointer;
}

.mxl-ptable-values input {
    flex: 0 0 auto;
    margin: 2px 8px 0 0;
}

.mxl-ptable-filters-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.mxl-ptable-reset {
    padding: 6px 16px;
    border: 1px solid #164BB7;
    background-color: #FFFFFF;
    color: #164BB7;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.mxl-ptable-reset:hover {
    background-color: #164BB7;
    color: #FFFFFF;
}

/* ---------- Product popover ---------- */
.mxl-ptable-popover {
    max-width: 380px;
    font-family: 'Roboto', sans-serif;
}

.mxl-ptable-popover .popover-body {
    padding: 12px 14px;
}

.mxl-ptable-popover-body {
    display: flex;
    align-items: flex-start;
}

.mxl-ptable-popover-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    line-height: 18px;
}

.mxl-ptable-popover-image {
    flex: 0 0 auto;
    width: 90px;
    margin-left: 12px;
}

.mxl-ptable-popover .name a {
    color: #164BB7;
    font-size: 15px;
    font-weight: 700;
}

.mxl-ptable-popover .description {
    margin: 4px 0 8px;
    color: #424B5A;
}

.mxl-ptable-popover .links a {
    display: block;
    margin-bottom: 2px;
    color: #164BB7;
}

.mxl-ptable-popover .status {
    display: block;
    margin-top: 6px;
    color: #424B5A;
}

/* ---------- Buy Now pop-up (distributor stock per orderable part) ---------- */
.mxl-buy-modal {
    font-family: 'Roboto', sans-serif;
}

.mxl-buy-modal .modal-content {
    border-radius: 0;
}

.mxl-buy-modal .modal-header {
    align-items: center;
    background-color: #262B34;
    border-radius: 0;
}

.mxl-buy-modal .modal-title {
    margin: 0;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 20px;
    font-weight: 500;
}

.mxl-buy-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    margin-left: 16px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .15);
    color: #FFFFFF;
    font-size: 22px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
}

.mxl-buy-close:hover,
.mxl-buy-close:focus {
    background-color: rgba(255, 255, 255, .3);
    outline: none;
}

.mxl-buy-table {
    margin-bottom: 16px;
    font-size: 14px;
}

.mxl-buy-table th {
    border-top: 0;
    border-bottom: 2px solid #C3C6CB;
    color: #262B34;
    font-weight: 700;
    white-space: nowrap;
}

.mxl-buy-table td {
    border-top: 0;
    color: #424B5A;
    vertical-align: middle;
}

.mxl-buy-table .mxl-buy-part-start td {
    border-top: 1px solid #C3C6CB;
}

.mxl-buy-table tbody tr:first-child td {
    border-top: 0;
}

.mxl-buy-table .mxl-buy-part {
    color: #262B34;
    font-weight: 700;
    white-space: nowrap;
}

.mxl-buy-table .mxl-buy-qty {
    font-weight: 700;
}

.mxl-buy-table .mxl-buy-none {
    color: #838181;
    font-style: italic;
}

.mxl-buy-button {
    display: inline-block;
    padding: 4px 18px;
    background-color: #164BB7;
    color: #FFFFFF;
    font-weight: 500;
}

.mxl-buy-button:hover {
    background-color: #0F3A93;
    color: #FFFFFF;
    text-decoration: none;
}

.mxl-buy-note,
.mxl-buy-loading,
.mxl-buy-error {
    margin: 0;
    color: #424B5A;
    font-size: 14px;
}

.mxl-buy-error {
    margin-bottom: 8px;
    color: #ED1C24;
}
