/**
 * ETC Site Care - Bol.com Style Search Backdrop Overlay
 */

:root {
    --etcsc-search-opacity: 0.6;
}

/* Transparent click-capture backdrop covering the viewport */
.etcsc-search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 99980;
    transition: visibility 0.35s ease;
}

body.etcsc-search-active .etcsc-search-backdrop {
    visibility: visible;
    pointer-events: auto;
    cursor: pointer;
}

/* Lift header container above the page content */
body.etcsc-search-active .etcsc-search-ancestor-lifted,
body.etcsc-search-closing .etcsc-search-ancestor-lifted {
    z-index: 99985 !important;
}

/* Ensure the search column sits above its sibling columns (logo, menu, cart) */
body.etcsc-search-active .whb-col-center,
body.etcsc-search-closing .whb-col-center {
    position: relative !important;
    z-index: 30 !important;
}

/* The active search container */
body.etcsc-search-active .etcsc-search-highlight,
body.etcsc-search-closing .etcsc-search-highlight {
    position: relative !important;
    z-index: 99995 !important;
}

/* Base smooth transition for searchform box-shadow */
.wd-search-form form.searchform,
form.woodmart-ajax-search,
form.woocommerce-product-search,
form.searchform {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    transition: box-shadow 0.35s cubic-bezier(0.25, 0.1, 0.25, 1), border-color 0.35s ease, background-color 0.35s ease !important;
}

/* Bol.com giant spotlight overlay:
   Darkens the entire screen (the header logo, menu, cart, top bar, banners, products, footer)
   while keeping the searchform completely clear and illuminated */
body.etcsc-search-active .etcsc-search-highlight form.searchform,
body.etcsc-search-active .etcsc-search-highlight.searchform,
body.etcsc-search-active .etcsc-search-highlight form {
    position: relative !important;
    z-index: 99996 !important;
    background-color: #fff !important;
    border-radius: var(--wd-form-brd-radius, 6px);
    box-shadow: 0 0 0 200vmax rgba(0, 0, 0, var(--etcsc-search-opacity, 0.6)),
                0 10px 35px rgba(0, 0, 0, 0.3) !important;
}

/* Keep WoodMart / WooCommerce search results dropdowns bright, elevated, and clickable */
body.etcsc-search-active .etcsc-search-highlight .wd-search-results-wrapper {
    position: relative !important;
    z-index: 99999 !important;
}

body.etcsc-search-active .etcsc-search-highlight .wd-dropdown-results,
body.etcsc-search-active .etcsc-search-highlight .wd-dropdown {
    position: absolute !important;
    top: 100% !important;
    z-index: 99999 !important;
    background-color: #fff !important;
}

body.etcsc-search-active .etcsc-search-highlight .autocomplete-suggestions,
body.etcsc-search-active .etcsc-search-highlight .dgwt-wcas-suggestions-wrapp {
    z-index: 99999 !important;
    background-color: #fff !important;
}
