/* Add this line if WooCommerce is used on this site */
/* @import "woo-style.css"; */

/* Child theme fonts */
:root {
    --font-family--default: 'DM Sans';
    --font-family--h--1: 'Montserrat';
    --font-family--h--2: var(--font-family--h--1);
    --font-family--h--3: var(--font-family--h--1);
    --font-family--h--4: var(--font-family--h--1);
    --font-family--h--5: var(--font-family--h--1);
    --font-family--h--6: var(--font-family--h--1);
    --font-family--h--2--footer: var(--font-family--h--1);
    --font-family--h--3--footer: var(--font-family--h--1);
    --font-family--h--4--footer: var(--font-family--h--1);
    --font-family--main-navigation: var(--font-family--default);
    --font-family--dropdown: var(--font-family--default);
    --font-family--megamenu--heading: var(--font-family--h--1);
    --font-family--gallery--caption: var(--font-family--default);
    --font-family--collapsible: var(--font-family--default);
    --font-family--tab: var(--font-family--default);
    --font-family--button: var(--font-family--default);
    --font-family--h--sub-heading--0: var(--font-family--h--1);
    --font-family--h--lead-text--0: var(--font-family--default);
}

/* Mobile navigation background */
@media only screen and (max-width: 1280px) {
    nav.imt-main-nav.offcanvas #imt-offcanvas {
        background-color: var(--wp--custom--imt--header--background-color--mobile) !important;
    }
}

/* Logo slider */
.imt-section .imt-logo-slider .imt-slide {
    height: 120px;
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.imt-section .imt-logo-slider .imt-slide .imt-img-max-width-sm img {
    max-width: var(--wp--custom--imt--image--max-width--sm);
    max-height: var(--wp--custom--imt--image--max-width--sm);
    width: auto;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Testimonial slider */
h2.imt-custom-testimonial-heading-icon:before {
    position: absolute;
    font-weight: var(--wp--custom--imt--font-weight);
    font-family: var(--font-family--h--1);
    content: "\201D";
    color: rgba(255, 255, 255, 0.25);
    font-size: 150px;
    top: 35px;
    left: 50%;
    transform: translate(-50%);
    z-index: -1;
}

@media only screen and (max-width: 800px) {

    /* Testimonial slider */
    .imt-slider-style-2 .slick-slide {
        padding: calc(var(--wp--custom--imt--spacer) * 2) calc(var(--wp--custom--imt--spacer) * 1) !important;
    }

    /* Slider controls */
    .imt-slider .slick-prev {
        top: calc(100% + 22px) !important;
        left: calc(50% - 115px) !important;
    }

    .imt-slider .slick-next {
        top: calc(100% + 22px) !important;
        right: calc(50% - 115px) !important;
    }

    /* Logo slider */
    .imt-logo-slider .slick-slider {
        margin-bottom: 64px;
    }

    .imt-imt-logo-slider .slick-slider .slick-slide {
        min-height: 100px;
    }

    .imt-slider.imt-logo-slider .slick-slide {
        padding: 16px !important;
        margin: 0 !important;
    }
}

/* Hide service area full bg image on mobile and tablet */
@media only screen and (max-width: 1281px) {
    .imt-section-bg-image-hide-on-mobile .imt-section__background-image {
        display: none !important;
    }
}

@media only screen and (max-width: 800px) {
    /* set updated min-width for mobile to stop overflow of icons */
    nav.imt-main-nav>div ul>li .submenu {
        min-width: 120px !important;
    }
    
    /* add overflow: hidden to stop horizontal scrolling of mobile menu */
    ul#main-navigation-ul {
        overflow: hidden;
    }
}

/* set 404 page CTA text color */
button.wp-block-search__button.wp-element-button {
    color: var(--wp--custom--imt--color--background--primary--text) !important;
}

button:hover.wp-block-search__button.wp-element-button {
    color: var(--wp--custom--imt--color--background--primary--hover--button--text) !important;
}

/* decrease heading font size for query loop to keep hierarchy but reduce text wrapping */
.wp-block-post h2.imt-heading {
    font-size: var(--wp--custom--imt--h--3--font-size) !important;
}

/* update font weight and text transformation for mobile menu + dropdowns */
li.menu-item {
    font-weight: var(--wp--custom--imt--main-navigation--font--weight);
    text-transform: var(--wp--custom--imt--main-navigation--font--transform);
}

/* hide after accent for mobile cta btn */
.imt-main-nav .imt-btn-1 a span::after {
    display: none;
}

/* vertically align logo in navbar - figure out why it broke */
.imt-logo {
    display: block;
}

/* GRAVITY FORMS FIXES */
/* fix business name font weight in newsletter & confirmation message */
#gform_4 .imt-business-name,
.gform_confirmation_message .imt-business-name {
    font-weight: inherit !important;
    display: inline;
    margin-bottom: 0;
}

/* gravity form drop down carets + field height */
.gform_wrapper.gravity-theme select {
    height: 44px;
    -webkit-appearance: auto;
}

/* clean up file upload layout */
.gform_wrapper.gravity-theme .gform_drop_area {
    background: var(--wp--custom--imt--gravity-forms--input--background) !important;
    border: var(--wp--custom--imt--gravity-forms--input--border--width) dashed var(--wp--custom--imt--gravity-forms--input--border--color) !important;
    border-radius: var(--wp--custom--imt--gravity-forms--input--border--radius) !important;
}

/* add background to checkboxes and radio buttons */
.gform_wrapper input[type=checkbox]+label::after {
    content: '';
    position: absolute;
    left: 0;
    z-index: 1;
    margin-top: .5px;
    background: var(--wp--custom--imt--gravity-forms--input--background);
    line-height: .75;
}

.gform_wrapper input[type=radio]+label::after {
    content: '';
    position: absolute;
    left: 0;
    z-index: 1;
    margin-top: .5px;
    background: var(--wp--custom--imt--gravity-forms--input--background);
    line-height: .75;
    border-radius: 50%;
}

/* fix validation link color for error links in form */
#imt-footer-wrapper a.gform_validation_error_link,
.gform_wrapper.gravity-theme .gform_validation_errors>ol a {
    color: var(--wp--custom--imt--color--palette--text--danger) !important;
}

/* apply correct error colour to checkbox items */
.gform_wrapper.gravity-theme .gfield_error label {
    color: var(--wp--custom--imt--color--palette--background--danger) !important;
}

/* update gravity forms button text transform to match site-wide CTAs */
.button.gform_button,
.button.gform_button_select_files {
    text-transform: var(--wp--custom--imt--button--default--transform) !important;
    font-weight: var(--wp--custom--imt--button--default--font-weight) !important;
}

/* fix line height of the checkbox item to vertically center it, add spacing back in afterwards */
.gform_wrapper.gravity-theme .gfield_checkbox label,
.gform_wrapper.gravity-theme .gfield_radio label {
    line-height: var(--wp--custom--imt--gravity-forms--label--sub-label--line-height) !important;
}

/* update trash icon color */
.gform_wrapper .dashicons {
    color: var(--wp--custom--imt--color--link--dark);
}

.gform_wrapper .dashicons:hover {
    color: var(--wp--custom--imt--color--link--dark-hover);
}

/* temporary fix for light link handling in heroes */
.imt-hero .imt-content-item a:not(.imt-link-text):hover {
    color: var(--wp--custom--imt--color--link--light-hover) !important;
}

@media only screen and (max-width: 800px) {
    /* update gradient for mobile specifically with solid overlay for improved legibility
       split out if using different styles of gradients */
    .imt-bg-color-gradient-1,
    .imt-bg-color-gradient-2,
    .imt-bg-color-gradient-3 {
        background-image: none;
        background-color: rgba(0,0,0,0.5);
    }
}

/* mimic non-query loop page image margin settings for images with no padding or all padding set */
.imt-section-query-loop-wrapper.imt-section .imt-card-group .imt-card.imt-global-card-padding-none>.acf-innerblocks-container>.imt-image-link>.imt-img-container,
.imt-section-query-loop-wrapper.imt-section .imt-card-group .imt-card.imt-global-card-padding-all-sm>.acf-innerblocks-container>.imt-image-link>.imt-img-container {
    margin: 0 0 var(--wp--custom--imt--card--global--content-item--default--margin-bottom-image);
}
 
 @media only screen and (max-width: 800px) {
     .imt-section-query-loop-wrapper.imt-section .imt-card-group .imt-card.imt-global-card-padding-none>.acf-innerblocks-container>.imt-image-link>.imt-img-container,
     .imt-section-query-loop-wrapper.imt-section .imt-card-group .imt-card.imt-global-card-padding-all-sm>.acf-innerblocks-container>.imt-image-link>.imt-img-container {
        margin: 0 0 var(--wp--custom--imt--card--global--content-item--mobile--margin-bottom-image);
    }
}

 /* set lead text in cards to take the default bottom margin for subheading, to separate from any paragraph settings */
.imt-section .imt-card-group .imt-card .imt-content-item.imt-paragraphs.imt-lead-text--0 {
    margin-bottom: var(--wp--custom--imt--card--global--content-item--default--margin-bottom-sub-heading);
}

/* set pagination to blog pagination colors to allow for light/dark link handling */
.imt-section .wp-block-query-pagination a {
    color: var(--wp--custom--imt--blog--pagination--link--color);
}

.imt-section .wp-block-query-pagination a:hover {
    color: var(--wp--custom--imt--blog--pagination--link--color-hover);
}

/* use uniquely defined font (desired font must be updated and set before this can be used) for first line of h1, increase its font size and weight */
.imt-section h1.imt-heading::first-line {
    font-weight: var(--wp--custom--imt--font-weight-bold);
    letter-spacing: 0.0125rem;
}

/* add stars via css to avoid them being erased in the editor over time */
/* use this snippet for stars BEFORE the quote */
.imt-stars p:first-of-type::before {
    display: block;
    font-weight: 900;
    font-family: "Font Awesome 6 Pro";
    content: "\f005 \f005 \f005 \f005 \f005";
    color: #fff !important;
    margin-bottom: calc(var(--wp--custom--imt--spacer) * 0.25);
}

.imt-business-details {
    font-weight: 600 !important;
    text-transform: uppercase !important;
}

.imt-btn.imt-btn-primary-outline {
    color: #000 !important;
}

@media only screen and (min-width: 1281px) {
    /* remove background color for heading */
    nav.imt-main-nav>div>ul>li.megamenu .submenu .megamenu-heading>a.imt-current-menu-item {
        background: none;
    }
    
    /* apply megamenu 3rd level styles */
    nav.imt-main-nav.full-mega>div>ul>li.megamenu>.submenu .imt-megamenu-wrapper li ul li a.imt-current-menu-item {
        background-color: var(--wp--custom--imt--main-navigation--link--submenu--active--background);
        color: #fff !important;
    }

    nav.imt-main-nav.full-mega>div>ul>li.megamenu>.submenu .imt-megamenu-wrapper li ul li a.imt-current-menu-item:hover {
        color: #000 !important;
    }
}

/* adjust careers embed to better match gravity forms styles */
#team-engine-careers-wrapper .dataTables_wrapper .dataTables_filter label {
    font-weight: var(--wp--custom--imt--gravity-forms--label--font-weight);
    font-size: var(--wp--custom--imt--gravity-forms--label--font-size);
    line-height: var(--wp--custom--imt--gravity-forms--label--line-height);
    color: var(--wp--custom--imt--gravity-forms--label--font-size);
}

#team-engine-careers-wrapper .dataTables_wrapper .dataTables_filter input[type="search"] {
    border: var(--wp--custom--imt--gravity-forms--input--border--width) var(--wp--custom--imt--gravity-forms--input--border--style) var(--wp--custom--imt--gravity-forms--input--border--color);
    border-radius: var(--wp--custom--imt--gravity-forms--input--border--radius);
}

#team-engine-careers-wrapper .dataTables_wrapper .dataTables_filter input[type="search"]:focus-within,
#team-engine-careers-wrapper .dataTables_wrapper .dataTables_filter input[type="search"]:focus-visible {
    outline: none;
    border: var(--wp--custom--imt--gravity-forms--input--border--width) var(--wp--custom--imt--gravity-forms--input--border--style) var(--wp--custom--imt--gravity-forms--input--border--color-focus);
    border-radius: var(--wp--custom--imt--gravity-forms--input--border--radius);
}