/* Keep the Elementor Header & Footer Builder menu available while scrolling. */
body.ehf-header #masthead {
    position: sticky;
    top: 0;
    /* The post-slider plugin hard-codes z-index: 99999 on its arrows. */
    z-index: 100000;
    isolation: isolate;
    background: #fff;
}

/* WordPress shifts the viewport down when the admin toolbar is visible. */
body.ehf-header.admin-bar #masthead {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.ehf-header.admin-bar #masthead {
        top: 46px;
    }
}

/* Quotation form on Home: Gravity Forms form 2, rendered by Essential Addons. */
#gform_wrapper_2 input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
#gform_wrapper_2 textarea,
#gform_wrapper_2 select {
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
}

#gform_wrapper_2 input::placeholder,
#gform_wrapper_2 textarea::placeholder {
    color: rgba(255, 255, 255, 0.75) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.75);
    opacity: 1;
}

#gform_wrapper_2 select option {
    color: #fff;
    background-color: #162542;
}

#gform_wrapper_2 input:-webkit-autofill,
#gform_wrapper_2 input:-webkit-autofill:hover,
#gform_wrapper_2 input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    transition: background-color 9999s ease-out 0s;
}

/* Gravity Forms validation feedback.
 * Keep the business rules in Gravity Forms, but make the invalid state clear
 * on both the dark Home form (ID 2) and the light Contact form (ID 3).
 */
#gform_wrapper_2 .gform_validation_errors,
#gform_wrapper_3 .gform_validation_errors {
    border: 1px solid #d94a38 !important;
    border-radius: 4px;
    margin: 0 0 18px;
    padding: 12px 14px;
}

#gform_wrapper_2 .gform_validation_errors {
    background: #fff5f2 !important;
    color: #7b1d12 !important;
}

#gform_wrapper_3 .gform_validation_errors {
    background: #fff5f2 !important;
    color: #7b1d12 !important;
}

#gform_wrapper_2 .gform_validation_errors h2,
#gform_wrapper_2 .gform_validation_errors ol,
#gform_wrapper_3 .gform_validation_errors h2,
#gform_wrapper_3 .gform_validation_errors ol {
    margin: 0;
}

#gform_wrapper_2 .gform_validation_errors h2,
#gform_wrapper_2 .gform_validation_errors ol,
#gform_wrapper_2 .gform_validation_errors li {
    color: #7b1d12 !important;
}

#gform_wrapper_3 .gform_validation_errors h2,
#gform_wrapper_3 .gform_validation_errors ol,
#gform_wrapper_3 .gform_validation_errors li {
    color: #7b1d12 !important;
}

#gform_wrapper_2 .gform_validation_errors h2,
#gform_wrapper_3 .gform_validation_errors h2 {
    font-size: 16px;
    line-height: 1.4;
}

#gform_wrapper_2 .gform_validation_errors ol,
#gform_wrapper_3 .gform_validation_errors ol {
    margin-top: 8px;
    padding-left: 20px;
}

#gform_wrapper_2 .gform_validation_errors a,
#gform_wrapper_3 .gform_validation_errors a {
    display: inline-block;
    line-height: 1.4;
    margin: 2px 0;
    text-decoration: underline;
}

#gform_wrapper_2 .gform_validation_errors .gform-icon,
#gform_wrapper_3 .gform_validation_errors .gform-icon {
    color: #d94a38 !important;
}

#gform_wrapper_2 .gform_validation_errors a {
    color: #143475 !important;
}

#gform_wrapper_3 .gform_validation_errors a {
    color: #7b1d12 !important;
}

#gform_wrapper_2 .gfield_error input:not([type="submit"]),
#gform_wrapper_2 .gfield_error textarea,
#gform_wrapper_2 .gfield_error select,
#gform_wrapper_3 .gfield_error input:not([type="submit"]),
#gform_wrapper_3 .gfield_error textarea,
#gform_wrapper_3 .gfield_error select {
    border-color: #e0523d !important;
    box-shadow: 0 0 0 1px rgba(224, 82, 61, 0.35) !important;
}

#gform_wrapper_2 .gfield_error input:focus,
#gform_wrapper_2 .gfield_error textarea:focus,
#gform_wrapper_2 .gfield_error select:focus,
#gform_wrapper_3 .gfield_error input:focus,
#gform_wrapper_3 .gfield_error textarea:focus,
#gform_wrapper_3 .gfield_error select:focus {
    outline: 2px solid rgba(255, 152, 135, 0.8) !important;
    outline-offset: 1px;
}

#gform_wrapper_2 .gfield_validation_message,
#gform_wrapper_2 .validation_message {
    color: #ffd1c9 !important;
    font-size: 13px;
    line-height: 1.35;
    margin-top: 6px;
}

#gform_wrapper_3 .gfield_validation_message,
#gform_wrapper_3 .validation_message {
    color: #a32d1d !important;
    font-size: 13px;
    line-height: 1.35;
    margin-top: 6px;
}

#gform_wrapper_2 .gfield_validation_message,
#gform_wrapper_3 .gfield_validation_message {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.btn-quote[aria-disabled="true"] {
    cursor: wait;
    opacity: 0.55;
    pointer-events: none;
}

/* Gravity Forms scrolls to this anchor after an AJAX validation response. */
#gform_wrapper_2,
#gform_wrapper_3 {
    scroll-margin-top: 120px;
}

/* The sticky header must not sit above the open enquiry cart. */
#aflex-enquiry-overlay {
    z-index: 100010 !important;
}

#aflex-enquiry-cart {
    z-index: 100020 !important;
}

/* Keep every mini-cart row aligned regardless of product-name/meta length. */
#aflex-enquiry-cart .aflex-enquiry-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 32px;
    align-items: start;
    column-gap: 16px;
    width: 100%;
    padding: 0 0 24px;
}

#aflex-enquiry-cart .aflex-enquiry-thumb {
    width: 64px;
}

#aflex-enquiry-cart .aflex-enquiry-thumb img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
}

#aflex-enquiry-cart .aflex-enquiry-meta {
    min-width: 0;
}

#aflex-enquiry-cart .remove-enquiry-item {
    align-self: start;
    justify-self: end;
    width: 32px;
    min-width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #e72d62;
    font-size: 22px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
}

#productModal,
#imageZoomPopup {
    z-index: 100030;
}

/* Homepage news slider arrows must stay below the sticky header. The slider
 * plugin ships them with z-index: 99999, which makes the two buttons overlap
 * the navigation while the page is scrolled. */
.home-news .wbel_post_slider_wrapper {
    position: relative;
    z-index: 1;
}

.home-news .wbel-arrow.wb-arrow-prev,
.home-news .wbel-arrow.wb-arrow-next {
    z-index: 2 !important;
}
