/* environ display */
.display-environ {
    color: red;
    background-color: #fff;
    border: 1px solid red;
    position: fixed;
    right: 40%;
    top: -90px;
    width: 260px;
    padding: 1rem;
    font-weight: bold;
    z-index: 1000;
}

.display-environ:hover {
    top: 0;
}

@media screen and (max-width: 1028px) {
    .display-environ {
        display: none;
    }
}

/* utility styles */
*,
::before,
::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
}

a img {
    border: none;
}

.alert {
    color: red;
}

.clear-both {
    clear: both;
}

.visuallyhidden {
    /**
     * Used for properly hiding label elements according to accessibility guidelines.
     * https://www.w3.org/WAI/tutorials/forms/labels/#note-on-hiding-elements
     */
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-wrapper object,
.video-wrapper embed,
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media screen and (min-width: 457px) {
    /* Visually hide click-to-call phone links at tablet/desktop sizes. */
    .click-to-call-phone {
        border: 0;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
}

@media screen and (max-width: 456px) {
    /* Visually hide non-click-to-call links at mobile sizes. */
    .no-click-phone {
        border: 0;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
}

/* Sticky Header */
@media screen and (max-width: 465px) {
    .sticky {
        position: fixed !important;
    }

    .header-top.sticky {
        top: 0;
        left: 0;
        width: 100%;
        height: 55px;
        background: #fff;
        z-index: 500;
    }
}

/* Mobile Search */
.mobile-search {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    background: #fff;
}

.mobile-search input {
    width: 215px;
    height: 42px;
    position: absolute;
    top: 5px;
    right: 47px;
}

.mobile-search button {
    background-color: #446ba8;
    border: none;
    height: 42px;
    width: 42px;
    position: absolute;
    right: 5px;
    top: 5px;
}

@media screen and (max-width: 465px) {
    .mobile-search {
        display: block;
        width: 100%;
    }

    .mobile-search input {
        width: 67%;
    }
}

/* Header styles */

.header {
    width: 100%;
    margin-bottom: 1rem;
}

.header img {
    max-width: 100%;
}

.header-left {
    float: left;
    width: 44%;
    margin: 1rem 0 0 0;
}

.header-left h1 {
    margin: 0;
}

.header-left .mobile-logo {
    display: none;
}

.header-right {
    float: right;
    margin: 1rem 0 0 0;
    text-align: right;
    font-size: 1.2rem;
    line-height: 1.1;
}

/* Top link styling */
.header-right .top-links {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    justify-content: space-between;
}

.header-right .top-links li {
    display: inline;
}

.top-links li img {
    width: 19px;
    height: 19px;
    margin-bottom: -3px;
    margin-right: 0.5rem;
}

@media screen and (max-width: 900px) {
    .header-left {
        margin-bottom: 1rem;
        float: none;
        width: 100%;
        text-align: center;
    }

    .header-left .logo {
        margin: 0 auto;
    }

    .header-right {
        float: none;
        width: 100%;
        margin: 0;
        text-align: center;
    }

    .header-right .top-links {
        justify-content: space-around;
    }
}

@media screen and (max-width: 450px) {
    .header-left .logo {
        right: 5px;
        text-align: right;
        top: 5px;
    }

    .header-right .top-links {
        display: flex;
        align-content: space-between;
    }

    .header-right .top-links li {
        flex-basis: 33%;
    }

    .top-links li img {
        width: 30px;
        height: 30px;
    }

    .top-links li span {
        display: none;
    }

    .header-right .top-links li:after {
        content: "";
    }
}

@media screen and (max-width: 600px) {
    .header-left {
        margin: 1rem 0 1rem 0;
    }

    .header-right {
        clear: both;
    }

    main.content-wrapper {
        overflow-x: scroll;
    }
}

@media screen and (max-width: 515px) {
    .header-left {
        margin-bottom: 1rem;
        text-align: right;
    }

    .header-left a {
        padding: 0;
    }

    .header-left .logo {
        width: 70%;
    }
}

@media screen and (max-width: 465px) {
    .header-left {
        margin: 60px 0 1rem 0;
        text-align: center;
    }
}

/* Header search styles */
.header-search {
    border: 1px solid black;
    float: right;
    font-size: 16px;
    width: 40%;
    min-width: 445px;
}

.header-search .search-frame {
    align-items: center;
    display: flex;
    background-color: #ffffff;
    justify-content: flex-start;
}

.header-search .search-frame div {
    align-self: center;
    flex: 0 0;
    height: 42px;
}

.header-search .loading-spinner {
    display: none;
    height: 38px;
}

.header-search div.search-select {
    padding-top: 1px;
    border-right: 1px solid #cccccc;
}

.header-search div.entry-cell {
    flex: 1 0;
}

.header-search input {
    border: none;
    height: 40px;
    font-size: 16px;
    width: 100%;
}

.header-search select {
    height: 40px;
    font-size: 16px;
    border: none;
}

.header-search #dealerSearch {
    width: 100%;
}

.header-search button {
    background-color: #446ba8;
    border: none;
    height: 42px;
    min-width: 40px;
}

.header-search button img {
    width: 30px;
}

/* Safari only styles - to fix alignment bugs */

/* Safari 11+ */
@media not all and (min-resolution:.001dpcm)
{ @supports (-webkit-appearance:none) and (stroke-color:transparent) {
    .header-search .search-frame div {
        margin-right: -2px;
    }

    .header-search .search-frame div.search-select {
        margin-right: -4px;
    }
}}

/* Safari 10.1 */
@media not all and (min-resolution:.001dpcm)
{  @supports (-webkit-appearance:none) and (not (stroke-color:transparent)) {
    .header-search .search-frame div {
        margin-right: -2px;
    }

    .header-search .search-frame div.search-select {
        margin-right: -4px;
    }
}}
/** End Safari Styles */

@media screen and (max-width: 900px) {
    .header-search {
        margin: 0 auto;
        float: none;
    }
}

@media screen and (max-width: 465px) {
    .header-search {
        display: none;
    }
}

@media screen and (max-width: 420px) {
    .header-search input {
        font-size: 12px;
    }
}

@media screen and (max-width: 365px) {
    .header-search input {
        font-size: 10px;
    }
}

/* navbar styles */
.navicon {
    position: relative;
    font-family: sans-serif;
    color: white;
    text-decoration: none;
    background: #446ba8;
    display: inline-block;
}

.navicon:link,
.navicon:visited,
.navicon:hover,
.navicon:active {
    color: #fff;
}

nav.drawer-content a,
nav.drawer-content a:link,
nav.drawer-content a:visited,
nav.drawer-content a:hover,
nav.drawer-content a:active {
    color: #000;
}

.drawer-container .drawer-tab {
    display: none;
    position: relative;
    left: 5px;
    background: #446ba8;
}

.drawer-container .drawer-tab img {
    width: 70%;
    margin: 6px auto;
    display: block;
}

nav.drawer-content {
    padding-left: 1rem;
    background: #E2E2E2;
    border: 1px solid #333399;
}

nav.drawer-content > ul {
    margin: 0;
    line-height: 2rem;
}

nav.drawer-content > ul > li {
    width: 19%;
}

nav.drawer-content ul {
    list-style: none;
    padding: 0.3rem 0 0 0;
    background: #E2E2E2;
    display: flex;
}

nav.drawer-content ul li {
    display: inline-block;
    position: relative;
    text-align: left;
}

nav.drawer-content ul li a {
    display: block;
    text-decoration: none;
}

nav.drawer-content ul li a:hover {
    text-decoration: underline;
}

.nav-item > .accordion-menu.open-accordion {
    width: 150%;
}

.nav-item:last-child > .accordion-menu.open-accordion {
    width: 115%;
    right: -20px; /* experimentally obtained. Push final menu to the left */
}

@media screen and (max-width: 1200px) {
    .nav-item:last-child > .accordion-menu.open-accordion {
        width: 160%;
        right: -20px; /* experimentally obtained. Push final menu to the left */
    }
}

.nav-link {
    padding-left: 0.5rem;
}

/** Navigation bar child indicator chevrons */
.accordion-toggle::after {
    position: relative;
    top: -5px;
    right: -7px;
    font-size: 0;
    content: " ";
    width: 0;
    height: 0;
    border-left: 7px solid #000000;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
}

.accordion-toggle.active::after {
    top: 0;
    border-top: 7px solid #446ba8;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
}

nav ul li div.accordion-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    border: 1px solid #333399;
    padding: 1rem;
    min-width: 100%;
    z-index: 1000;
}

nav ul li div.accordion-menu.submenu {
    position: relative;
    min-width: 80%;
    border-top: 1px solid #333399;
    border-bottom: 1px solid #333399;
    border-left: none;
    border-right: none;
}

.accordion-menu.open-accordion {
    display: block;
}

.accordion-menu .accordion-toggle.submenu.active {
    background-color: #e2e2e2;
    /*color: #333399;*/
    border-top: 1px solid #333399;
}

nav ul li ul.dropdown li {
    display: block;
}

@media screen and (max-width: 900px) {
    .drawer-container .drawer-tab {
        width: 42px;
        height: 42px;
        display: block;
        position: absolute;
        top: 5px;
        left: 5px;
        z-index: 500;
    }

    .drawer-container .drawer-tab a {
        display: block;
    }

    .drawer-container nav.drawer-content {
        display: none;
    }

    .drawer-container.open-drawer .drawer-content {
        display: block;
        position: fixed;
        overflow-y: scroll;
        background-color: #fff;
        top: 45px;
        height: 85%;
        width: 75%;
        z-index: 100;
        padding: 1rem;
        margin-left: 0;
        -webkit-box-shadow: 4px 0 29px -4px rgba(0,0,0,0.75);
        -moz-box-shadow: 4px 0 29px -4px rgba(0,0,0,0.75);
        box-shadow: 4px 0 29px -4px rgba(0,0,0,0.75);
    }

    .drawer-container.open-drawer .drawer-content ul {
        background-color: #fff;
    }

    .drawer-container.open-drawer .drawer-content li.nav-item {
        display: block;
    }

    .drawer-container nav > ul > li {
        width: 100%;
    }

    nav ul li div.accordion-menu {
        position: relative;
        border-left: none;
        border-right: none;
        padding: 1rem;
        min-width: auto;
    }

    .nav-link.accordion-toggle.active {
        background-color: #e2e2e2;
        border-top: 1px solid #333399;
    }

    .nav-item > .accordion-menu.open-accordion {
        width: auto;
    }

    .nav-item:last-child > .accordion-menu.open-accordion {
        width: auto;
        right: auto;
    }
}

/** Nav Pane styles */
div.nav-pane {
    background-color: #e2e2e2;
    border: 1px solid #333399;
    border-top: 5px solid #333399;
    padding: 2px;
    width: 20%;
    float: left;
    max-width: 300px;
}

div.nav-pane > div {
    margin: 1rem 0;
}

div.nav-pane a.black-link,
div.nav-pane a.black-link:link,
div.nav-pane a.black-link:visited,
div.nav-pane a.black-link:hover,
div.nav-pane a.black-link:active {
    color: #000;
}

div.nav-pane p + a {
    display: block;
    margin-top: 1rem;
    text-align: center;
}

div.nav-pane .nav-pane-links a {
    display: block;
    margin-left: 0.5rem;
    margin-bottom: 1rem;
}

div.nav-pane .small-featured-prod {
    background: #fff;
    text-align: center;
    padding: 0.5rem;
}

div.nav-pane .small-featured-prod img {
    display: block;
    margin: 0 auto;
}

div.nav-pane .promo-tip {
    background: #ffff00;
    padding: 0.5rem;
    text-align: center;
    margin: 1rem 0;
}

div.nav-pane .promo-tip .promo-title {
    font-weight: bold;
    font-size: 1.2rem;
}

div.nav-pane .popular-prods {
    text-align: center;
}

div.nav-pane .popular-title,
div.nav-pane .additional-popular {
    background: #9fb7e8;
    padding: 0.5rem 0;
}

div.nav-pane .popular-body {
    background: #fff;
    padding: 0.5rem 0;
}

div.nav-pane .popular-prods img {
    display: block;
    margin: 0 auto;
}
div.nav-pane .machinists-calculator img {
    display: block;
    margin: 0 auto;
}

div.nav-pane .metal-supplier {
    text-align: center;
}

@media screen and (max-width: 980px) {
    div.nav-pane {
        width: 100%;
        float: none;
        text-align: center;
        padding-top: 1rem;
        clear: both;
        max-width: unset;
    }

    div.nav-pane > div {
        margin-left: 2%;
        width: 31%;
        float: left;
    }

    div.nav-pane > div:first-child {
        margin-left: 0;
    }

    div.nav-pane > div.clear-both {
        float: none;
    }
}

@media screen and (max-width: 675px) {
    div.nav-pane {
        padding: 0;
    }

    div.nav-pane > div {
        margin: 1rem 0;
        width: 100%;
        float: none;
    }
}

/** Content Table/Wrapper styles */
main.content-wrapper {
    width: 78%;
    border: none;
    float: right;
}

/** Adjust the gutter between left nav and main content at different screen sizes */
@media screen and (min-width: 1600px) {
    main.content-wrapper {
        width: 80%;
    }
}

@media screen and (min-width: 1900px) {
    main.content-wrapper {
        width: 83%;
    }
}

@media screen and (max-width: 980px) {
    main.content-wrapper {
        margin-top: 1rem;
        width: 100%;
        float: none;
    }
}

/** Footer styles */

footer {
    position: relative;
    clear: both;
}

footer .footer-links a {
    text-align: center;
    line-height: 2rem;
    margin-bottom: 1rem;
}

footer .footer-links span::after {
    content: " | ";
}

footer .footer-links span:last-child::after {
    content: "";
}

.subfooter span.contact {
    text-align: right;
}

.subfooter span {
    width: 45%;
    display: inline-block;
}

.subfooter .contact img {
    margin-bottom: -3px; /* nudge icon downwards */
    width: 16px;
    height: 16px;
}

@media screen and (max-width: 900px) {
    /** footer links to two column */
    footer .footer-links a {
        width: 45%;
        display: inline-block;
    }

    footer .footer-links span:last-child a {
        width: 100%;
    }
    /** remove the footer link delimiter */
    footer .footer-links span::after {
        content: "";
    }

    /** The subfooter needs to be allowed to go single column */
    .subfooter span {
        display: block;
        width: 100%;
        text-align: center !important;
    }
}

/* Affirm product blurb */
.affirm-box {
    border: 1px solid black;
    padding: 1rem;
    text-align: center;
    background: #fff;
    margin-bottom: 1rem;
}

.affirm-box p {
    margin-bottom: 0;
}

.affirm-box a {
    display: block;
    margin-top: 0.5rem;
}

/** home page styles **/
div.lead-copy {
    margin: 1rem 0;
}

div.products-pane {
    width: 36%;
    margin-right: 4%;
    float: left;
}

div.products-pane p.body_c {
    margin-bottom: 1rem;
}

div.right-column {
    width: 60%;
    float: left;
}

.clear-both {
    clear: both;
}

@media screen and (max-width: 700px) {
    div.products-pane,
    div.right-column {
        width: 100%;
        float: none;
    }
}

/* Weekly Special Styles */
.weekly-special {
    background-color: #eeeedf;
    border-bottom: 1px solid #000;
    text-align: center;
}

.weekly-special .title {
    background-color: #668abe;
    color: #ff3;
    text-transform: uppercase;
    font-size: 20pt;
    font-style: italic;
    text-align: center;
    padding: 0.2rem 0;
}

.weekly-special img {
    float: left;
    margin: 1rem 0 0 1rem;
}

.weekly-special .special-info {
    float:right;
    width: 50%;
    padding-top: 1rem;
}

.weekly-special .special-info .price {
    color: #900;
    font-size: 20pt;
}

.weekly-special .special-info input.btn {
    background-color: #ffff33;
    color: #339;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    font-size: 16px;
    font-weight: bold;
}

.weekly-special .product-title {
    color: #900;
    margin: 0.5rem 0;
    font-weight: bold;
}

@media screen and (max-width: 1200px) {
    /** Weekly specials and Featured products need to go single column */
    .weekly-special img {
        float: none;
        width: auto;
    }

    .weekly-special .special-info {
        float: none;
        width: 100%;
        text-align: center;
    }

}

/* Featured Products column */
.featured-product {
    border-bottom: 1px solid #000;
    padding: 1rem 0;
}

.featured-product img {
    float: left;
}

.featured-product .product-details {
    width: 60%;
    float: right;
}

.featured-product .add-to {
    text-align: center;
}

.featured-product .product-details .price {
    width: 30%;
    float: left;
    font-weight: bold;
    padding-top: 0.5rem;
}

.featured-product input.btn {
    padding: 0.5rem;
    margin-bottom: 1rem;
}

.featured-product .product-details button {
    background-color: #ffff33;
    color: #339;
    padding: 0.5rem 1rem;
    font-size: 16px;
    font-weight: bold;
    float: right;
    margin-bottom: 0.3rem;
}

@media screen and (max-width: 1260px)
{
    .featured-product img {
        float: none;
        display: block;
        margin: 0 auto;
    }

    .featured-product .product-details {
        float: none;
        width: 100%;
    }
}

/* Chris Tip styling */
.chris-tip {
    background-color: rgb(255,255,204);
    color: rgb(51, 51, 153);
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Kind Words/Testimonial styling */

.testimonial {
    border: 1px solid rgb(51, 51, 153);
    padding: 0.5rem;
    color: #339;
}

.testimonial .title {
    font-weight: bold;
}

.testimonial .testimonial-body {
    font-style: italic;
}

.testimonial .testimonial-tag {
    text-align: right;
}

/* local user product nav*/
.local-product-nav {
    background: #c0c0c0;
    padding: 0.5rem;
    border: 1px solid black;
    margin-top: 1rem;
}

.local-product-nav ul {
    display: flex;
    list-style: none;
    justify-content: space-between;
    padding: 0;
    margin: 0;
}

td .local-product-nav ul li {
    /* fix flex box collapse if in a table. */
    min-width: 150px;
}

@media screen and (max-width: 750px) {
    .local-product-nav li:nth-last-child(-n+3) {
        display: none;
    }
}
