/* CSS variables. */
:root {
    --left-column-width: 20%;
    --right-column-width: 80%;
}

/* Set default box sizing for easier layout calculations. */
*, *:before, *:after {
    box-sizing: border-box;
}

/* Hide select drop downs, modal dialogs, and the footer. */
.select__content.custom-dropdown,
.modal,
.layout__footer {
    display: none;
}

/* Hide the cookie banner. */
#pi_tracking_opt_in_div {
    display: none;
}
body {
    padding: 0 !important; /* Override inline style added for the cookie banner. */
}

/* Hide the link to Umbraco. */
.link-to-umbraco {
    display: none;
}

/* Hide the videos section on the product detail page. */
.usc-pd__section.video {
    display: none;
}

/* Hide card carousels, which includes the related products on the product detail page. */
.usc-cc {
    display: none;
}

/* Hide elements from the header (except the logo). */
.header__buttons,
.header__mobile__menu,
.header__mobile__search,
.header__top {
    display: none;
}

/* Product detail images: hide pager. */
.usc-pd__preview-card__color-select-wrapper {
    display: none;
}

/* Product detail images: hide header. */
.usc-pd__preview-card__header {
    display: none;
}

/* Hide the sitemap (e.g., on the homepage footer). */
.usc-sitemap {
    display: none;
}

/* On the product detail page, show the image(s) before the product details. */
.usc-pd__wrapper {
    display: flex;
    flex-direction: column;
}
.usc-pd__preview {
    order: 1;
}
.usc-pd__info {
    order: 2;
}

/* Show link URLs, except for homepage links. */
a[href^='http']:not([href='https://www.usconec.com/'])::after {
    content: " (" attr(href) ") ";
}
a[href^='/']:not([href='/'])::after {
    content: " (https://www.usconec.com" attr(href) ") ";
}

/* Give images sensible sizes. */
img {
    max-width: 50%;
    height: auto;
}

/* Center the header logo. */
.header__logo img {
    display: block;
    margin: 0 auto 50px 0;
    max-width: 25%;
}

/* Set default font size. */
body {
    font-size: 14px;
}
h1 {
    font-size: 1.5em;
}
h2 {
    font-size: 1.25em;
}
h3 {
    font-size: 1.1em;
}

/* Customize general tables on the product detail page so they're more compact. */
.usc-pd__table__row {
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
}
.usc-pd__table__row__col1 {
    width: var(--left-column-width);
}
.usc-pd__table__row__col2 {
    width: var(--right-column-width);
    padding-left: 20px;
}
.usc-pd__table__cell,
.usc-pd__table__cell-label {
    position: relative;
    padding-top: 10px;
    padding-bottom: 5px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.usc-pd__table__row__col1,
.usc-pd__table__row__col2 {
    border-bottom: 1px solid #aaa;
}
.usc-pd__download-anchor:after {
    display: none;
}

/* Customize kit bill of materials on product detail page so it's more compact. */
.usc-pd__section.full-table {
    .usc-pd__table__cell-label {
        display: none;
    }

    .usc-pd__table__header {
        display: flex;
        font-weight: bold;
    }

    .usc-pd__table__header--id,
    .usc-pd__table__header--name,
    .usc-pd__table__header--drawing {
        flex: 0 0 33%;
        border-left: 1px solid #000;
        border-top: 1px solid #000;
        border-bottom: 1px solid #000;
        padding: 5px;
    }

    .usc-pd__table__header--id {
        border-left: 1px solid #000;
    }

    .usc-pd__table__header--drawing {
        border-right: 1px solid #000;
    }

    .usc-pd__table__row--drawing {
        border-right: 1px solid #000;
    }

    .usc-pd__table__cell {
        flex: 0 0 33%;
        border-left: 1px solid #000;
        border-bottom: 1px solid #000;
        padding: 5px;
    }

    .usc-pd__table__row {
        display: flex;
    }

    & a:after {
        display: none;
    }
}

/* Place the "Features" and "Applications" sections side-by-side on the product detail page. */
.usc-pd__info {
    display: flex;
    flex-wrap: wrap;
    gap: 0 30px;
}
.usc-pd__section {
    width: 100%;
}
.usc-pd__section:not(.simple-table):not(.full-table) {
    width: calc(50% - 15px);
}