/*
 * Customizable Expandable Search
 * Production stylesheet v2.1.1
 * Fully scoped to .ces-* classes to minimize theme conflicts.
 */

/* --------------------------------------------------------------------------
   Base reset and shared variables
   -------------------------------------------------------------------------- */
.ces-toggle,
.ces-panel,
.ces-panel *,
.ces-shortcode,
.ces-shortcode * {
    box-sizing: border-box;
}

#ces-source,
#ces-results-source {
    display: none !important;
}

.ces-shortcode {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Toggle button
   -------------------------------------------------------------------------- */
.ces-toggle {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    vertical-align: middle !important;
    width: var(--ces-icon-button-size, 40px) !important;
    min-width: var(--ces-icon-button-size, 40px) !important;
    max-width: var(--ces-icon-button-size, 40px) !important;
    height: var(--ces-icon-button-size, 40px) !important;
    min-height: var(--ces-icon-button-size, 40px) !important;
    max-height: var(--ces-icon-button-size, 40px) !important;
    margin: 0 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: var(--ces-icon-color, currentColor) !important;
    box-shadow: none !important;
    font: inherit !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: none !important;
    cursor: pointer !important;
    transition: background-color .16s ease, transform .16s ease !important;
}

.ces-toggle:hover,
.ces-toggle:focus-visible {
    background: var(--ces-icon-hover, rgba(255,255,255,.12)) !important;
    color: var(--ces-icon-color, currentColor) !important;
    outline: 2px solid currentColor !important;
    outline-offset: 2px !important;
}

.ces-toggle:active {
    transform: scale(.96);
}

.ces-toggle svg {
    display: block !important;
    width: var(--ces-icon-size, 23px) !important;
    height: var(--ces-icon-size, 23px) !important;
    margin: 0 !important;
    padding: 0 !important;
    fill: currentColor !important;
    pointer-events: none;
}

.ces-close-icon {
    display: none !important;
}

.ces-toggle-open .ces-open-icon {
    display: none !important;
}

.ces-toggle-open .ces-close-icon {
    display: block !important;
}

.ces-toggle-auto {
    display: inline-flex !important;
    vertical-align: middle !important;
}

.ces-keep-open > .ces-toggle {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Expandable panel
   -------------------------------------------------------------------------- */
.ces-auto-panel-holder {
    display: block;
    clear: both;
    width: 100%;
}

.ces-panel {
    position: relative;
    z-index: 997;
    display: block;
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: transparent;
    opacity: 0;
    transition:
        height 220ms cubic-bezier(.22,.61,.36,1),
        opacity .18s ease;
}

.ces-panel[hidden] {
    display: block !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.ces-panel-open {
    opacity: 1;
}

.ces-panel.ces-panel-open,
.ces-panel-immediate,
.ces-shortcode.ces-keep-open .ces-panel,
.ces-shortcode.ces-open-default .ces-panel.ces-panel-open {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.ces-panel-inner {
    width: 100%;
    margin: 0;
    padding: var(--ces-padding, 24px);
}

.ces-panel-shortcode {
    margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Form layout
   -------------------------------------------------------------------------- */
.ces-form {
    display: block !important;
    width: min(100%, var(--ces-width, 1100px)) !important;
    max-width: var(--ces-width, 1100px) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: var(--ces-left, auto) !important;
    margin-right: var(--ces-right, auto) !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.ces-box {
    display: flex !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    min-width: 0 !important;
    height: var(--ces-height, 58px) !important;
    min-height: var(--ces-height, 58px) !important;
    max-height: var(--ces-height, 58px) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: var(--ces-bg, #fff) !important;
    border: var(--ces-border-width, 2px) solid var(--ces-border, #0b4f7c) !important;
    border-radius: var(--ces-radius, 8px) !important;
    box-shadow: var(--ces-shadow, 0 10px 28px rgba(0,0,0,.12)) !important;
    line-height: normal !important;
    transition: box-shadow .16s ease, border-color .16s ease;
}

.ces-box:focus-within {
    box-shadow:
        var(--ces-shadow, 0 10px 28px rgba(0,0,0,.12)),
        0 0 0 3px rgba(11,79,124,.15) !important;
}

.ces-leading-icon {
    display: block !important;
    align-self: center !important;
    flex: 0 0 22px !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    margin: 0 0 0 18px !important;
    padding: 0 !important;
    fill: var(--ces-text, #172033) !important;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Search input
   -------------------------------------------------------------------------- */
.ces-input,
.ces-form input[type="search"].ces-input,
.ces-form input[type="text"].ces-input {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: block !important;
    flex: 1 1 auto !important;
    align-self: stretch !important;
    min-width: 100px !important;
    width: auto !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: var(--ces-text, #172033) !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 18px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: var(--ces-height, 58px) !important;
    letter-spacing: normal !important;
    text-indent: 0 !important;
    text-transform: none !important;
}

.ces-input::-webkit-search-decoration,
.ces-input::-webkit-search-cancel-button,
.ces-input::-webkit-search-results-button,
.ces-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

.ces-input::placeholder {
    color: var(--ces-placeholder, #6b7280) !important;
    opacity: 1 !important;
}

/* --------------------------------------------------------------------------
   Filter controls
   -------------------------------------------------------------------------- */
.ces-controls {
    display: flex !important;
    align-items: stretch !important;
    align-self: stretch !important;
    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-left: 1px solid var(--ces-filter-border, #d8dee8) !important;
    background: transparent !important;
}

.ces-select,
.ces-form select.ces-select {
    -webkit-appearance: menulist !important;
    appearance: auto !important;
    display: block !important;
    align-self: stretch !important;
    flex: 0 0 auto !important;
    min-width: 135px !important;
    width: auto !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 36px 0 14px !important;
    border: 0 !important;
    border-right: 1px solid var(--ces-filter-border, #d8dee8) !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background-color: var(--ces-filter-bg, #f8fafc) !important;
    background-image: none !important;
    color: var(--ces-filter-text, #334155) !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-style: normal !important;
    font-weight: 600 !important;
    line-height: normal !important;
    letter-spacing: normal !important;
    text-indent: 0 !important;
    text-transform: none !important;
    cursor: pointer !important;
}

.ces-select:focus-visible {
    position: relative;
    z-index: 2;
    outline: 2px solid var(--ces-border, #0b4f7c) !important;
    outline-offset: -2px !important;
}

/* --------------------------------------------------------------------------
   Submit button
   -------------------------------------------------------------------------- */
.ces-submit,
.ces-form button.ces-submit,
.ces-form input[type="submit"].ces-submit {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: stretch !important;
    flex: 0 0 auto !important;
    min-width: var(--ces-button-width, 110px) !important;
    width: auto !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 22px !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: var(--ces-button, #0b4f7c) !important;
    color: var(--ces-button-text, #fff) !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-align: center !important;
    text-decoration: none !important;
    text-indent: 0 !important;
    text-transform: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: background-color .15s ease, transform .15s ease !important;
}

.ces-submit:hover,
.ces-submit:focus-visible {
    background: var(--ces-button-hover, #073b5d) !important;
    color: var(--ces-button-text, #fff) !important;
}

.ces-submit:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: -4px !important;
}

.ces-submit:active {
    transform: translateY(1px);
}

/* --------------------------------------------------------------------------
   Search-results placement
   -------------------------------------------------------------------------- */
.ces-results-auto {
    display: block;
    width: 100%;
    margin: 0 0 28px;
    padding: 0;
}

/* Compact spacing when the box is inserted at the top of main content. */
.ces-results-auto.ces-results-position-top-content {
    margin-top: 0 !important;
    margin-bottom: var(--ces-results-gap, 8px) !important;
}

/* Optional sticky search on result pages. */
.ces-results-auto.ces-results-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: var(--ces-sticky-offset, 0px);
    z-index: 999;
    background: var(--ces-bg, #fff);
    isolation: isolate;
}

.ces-results-auto.ces-results-sticky .ces-panel-inner {
    padding-top: 10px;
    padding-bottom: 10px;
}

.ces-results-auto .ces-panel {
    border: 0;
    background: transparent;
}

.ces-results-auto .ces-panel-inner {
    padding-right: 0;
    padding-left: 0;
}

/* --------------------------------------------------------------------------
  Highlight the serach term in the result
  ---------------------------------------------------------------------------*/
  .ces-highlight {
    display: inline;
    padding: 0 2px;
    border-radius: 2px;
    background: #f5e58bad;
    color: inherit;
    font-weight: 700;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;

  }


/* --------------------------------------------------------------------------
   Blade / GRVE compatibility
   -------------------------------------------------------------------------- */
.grve-header-element > .ces-toggle-auto,
.grve-hidden-menu-btn .ces-toggle-auto {
    display: inline-flex !important;
    float: none !important;
    position: relative !important;
    inset: auto !important;
    vertical-align: middle !important;
    margin-left: 8px !important;
}

#grve-header + .ces-panel {
    clear: both;
    width: 100%;
    z-index: 998;
}

/* Defeat common theme styles that add spacing or rounded corners to fields. */
#grve-theme-wrapper .ces-form .ces-input,
#grve-theme-wrapper .ces-form .ces-select,
#grve-theme-wrapper .ces-form .ces-submit,
.grve-body .ces-form .ces-input,
.grve-body .ces-form .ces-select,
.grve-body .ces-form .ces-submit {
    margin: 0 !important;
    box-shadow: none !important;
}


/* ----------------------------------------------------------
   Perfect Material-style floating placeholder for CES input
   ---------------------------------------------------------- */
/* .ces-box {
    position: relative;
    overflow: visible !important;
} */

/* Hide real placeholder */
/* .ces-input::placeholder {
    color: transparent !important;
} */

/* Floating label */
/* .ces-box::after {
    content: attr(data-placeholder);
    position: absolute;
    left: 54px;
    top: 19px; 
    font-size: 18px;
    color: var(--ces-placeholder, #6b7280);
    pointer-events: none;
    background: transparent;
    transition: 0.22s ease all;
    z-index: 10;
} */

/* Hide floating label when user has typed OR on search results page */
/* .ces-box:has(.ces-input:not(:placeholder-shown))::after {
    display: none !important;
} */

/* If input has text, float label exactly like focus state */
/*.ces-box:has(.ces-input:not(:placeholder-shown))::after {
    top: -12.5px;
    left: 54px;
    font-size: 13px;
    font-weight: 700;
    font-style: normal;
    color: var(--ces-border, #0b4f7c);

    background: transparent;

    
    text-shadow:
  
    -2px -2px 3px rgba(255,255,255,1),
     2px -2px 3px rgba(255,255,255,1),
    -2px  2px 3px rgba(255,255,255,1),
     2px  2px 3px rgba(255,255,255,1),
    -2px  0   3px rgba(255,255,255,1),
     2px  0   3px rgba(255,255,255,1),
     0  -2px 3px rgba(255,255,255,1),
     0   2px 3px rgba(255,255,255,1),

    
    0 0 8px rgba(255,255,255,0.95),
    0 0 14px rgba(255,255,255,0.9),
    0 0 20px rgba(255,255,255,0.8);




    z-index: 60;
}*/







/* FLOAT UP — both focus + input has value */
/*.ces-box:focus-within::after,
.ces-input:not(:placeholder-shown) ~ .ces-box::after {
    top: -12.5px;   
    left: 54px;        
    font-size: 13px;
    font-style:normal;
    font-weight: 700;
    
    
    background: transparent;
    padding: 0;

    

    z-index: 60;             
    color: var(--ces-border, #0b4f7c);

   
    

    

text-shadow:

    -2px -2px 3px rgba(255,255,255,1),
     2px -2px 3px rgba(255,255,255,1),
    -2px  2px 3px rgba(255,255,255,1),
     2px  2px 3px rgba(255,255,255,1),
    -2px  0   3px rgba(255,255,255,1),
     2px  0   3px rgba(255,255,255,1),
     0  -2px 3px rgba(255,255,255,1),
     0   2px 3px rgba(255,255,255,1),


    0 0 8px rgba(255,255,255,0.95),
    0 0 14px rgba(255,255,255,0.9),
    0 0 20px rgba(255,255,255,0.8);




}*/

/* Hide GRVE elements ONLY on empty search */
/* body.ces-empty-search .grve-content-none h3,
body.ces-empty-search .grve-content-none p,
body.ces-empty-search .grve-search,
body.ces-empty-search .grave-widget {
    display: none !important;
} */

/* Instantly hide unwanted GRVE search elements before JS runs */
/* body.search .grve-content-none,
body.search #grve-page-title .grve-description,
body.search #grve-page-title .grve-title, */
body.search .grve-content-none h3,
body.search .grve-content-none p,
body.search .grve-search,
body.search .grave-widget {
    display: none !important;
}



/* --------------------------------------------------------------------------
   Tablet
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .ces-select,
    .ces-form select.ces-select {
        min-width: 112px !important;
        padding-right: 28px !important;
        padding-left: 10px !important;
        font-size: 13px !important;
    }

    .ces-submit,
    .ces-form button.ces-submit,
    .ces-form input[type="submit"].ces-submit {
        min-width: 90px !important;
        padding-right: 16px !important;
        padding-left: 16px !important;
    }
}

/* --------------------------------------------------------------------------
   Mobile: controls move to a second row
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
    .ces-panel-inner {
        padding: 14px;
    }

    .ces-results-auto .ces-panel-inner {
        padding-right: 0;
        padding-left: 0;
    }

    .ces-box {
        flex-wrap: wrap !important;
        height: auto !important;
        min-height: var(--ces-height, 58px) !important;
        max-height: none !important;
        overflow: hidden !important;
    }

    .ces-leading-icon {
        flex: 0 0 22px !important;
    }

    .ces-input,
    .ces-form input[type="search"].ces-input,
    .ces-form input[type="text"].ces-input {
        flex: 1 1 calc(100% - 50px) !important;
        min-width: 0 !important;
        width: auto !important;
        height: var(--ces-height, 58px) !important;
        min-height: var(--ces-height, 58px) !important;
        max-height: var(--ces-height, 58px) !important;
        font-size: 16px !important;
        line-height: var(--ces-height, 58px) !important;
    }

    .ces-controls {
        flex: 1 1 100% !important;
        width: 100% !important;
        height: var(--ces-height, 58px) !important;
        min-height: var(--ces-height, 58px) !important;
        max-height: var(--ces-height, 58px) !important;
        border-top: 1px solid var(--ces-filter-border, #d8dee8) !important;
        border-left: 0 !important;
    }

    .ces-select,
    .ces-form select.ces-select {
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }

    .ces-submit,
    .ces-form button.ces-submit,
    .ces-form input[type="submit"].ces-submit {
        flex: 0 0 auto !important;
        min-width: 88px !important;
    }

    .ces-hide-mobile {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   Small mobile: filters and button stack cleanly
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .ces-controls {
        flex-wrap: wrap !important;
        height: auto !important;
        min-height: var(--ces-height, 58px) !important;
        max-height: none !important;
    }

    .ces-select,
    .ces-form select.ces-select {
        flex: 1 1 50% !important;
        min-width: 50% !important;
        height: var(--ces-height, 58px) !important;
        min-height: var(--ces-height, 58px) !important;
        max-height: var(--ces-height, 58px) !important;
        border-bottom: 1px solid var(--ces-filter-border, #d8dee8) !important;
    }

    .ces-submit,
    .ces-form button.ces-submit,
    .ces-form input[type="submit"].ces-submit {
        flex: 1 1 100% !important;
        width: 100% !important;
        height: 50px !important;
        min-height: 50px !important;
        max-height: 50px !important;
    }
}


/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .ces-panel,
    .ces-toggle,
    .ces-box,
    .ces-submit {
        transition: none !important;
    }
}


@media (max-width: 700px) {
    .ces-results-auto.ces-results-sticky .ces-panel-inner {
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

/* Version 3.0 results-placement and sticky hardening */
.ces-results-auto {
    position: relative;
    isolation: isolate;
    clear: both;
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    margin-bottom: var(--ces-results-gap, 8px);
}

.ces-results-position-top-content {
    margin-top: var(--ces-results-gap, 8px);
    margin-bottom: var(--ces-results-gap, 8px);
}

.ces-results-auto.ces-results-sticky {
    position: sticky;
    top: var(--ces-sticky-offset, 0px);
    z-index: 9990;
    padding-top: 6px;
    padding-bottom: 6px;
    background: #fff;
}

.ces-results-auto.ces-results-sticky::before {
    content: "";
    position: absolute;
    inset: 0 -12px;
    z-index: -1;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15,23,42,.08);
    opacity: .98;
}

@media (max-width: 700px) {
    .ces-results-auto.ces-results-sticky {
        padding-top: 4px;
        padding-bottom: 4px;
    }
}
