/**
 * FineCenter - General Search V2.19.5
 * Stage 5.5.1.1 — Focus-Based Widget Ownership
 *
 * - Only the active responsive Search widget may display a Footer.
 * - Desktop widget position and width are applied by JavaScript
 *   and clamped inside the viewport.
 * - Results remain an overlay and never affect page height.
 */

.fc-general-search-managed {
    --fc-search-footer-height: 46px;
    --fc-search-layer: 2147483600;
}


/* Hide Elementor pagination in live results. */
.fc-general-search-managed
:is(
    .e-search-pagination,
    .e-search-results-pagination,
    .elementor-pagination,
    nav[aria-label="Pagination"],
    nav[aria-label="pagination"]
) {
    display: none !important;
}


/* Only the selected responsive widget is visible/interactable. */
.fc-general-search-managed.fc-search-widget-open {
    z-index: var(--fc-search-layer) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}


.fc-header-live-search.is-open
.fc-general-search-managed:not(.fc-search-widget-open) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}


/* Do not clip the fixed widget or its result overlay. */
.fc-general-search-managed,
.fc-general-search-managed
> .elementor-widget-container,
.fc-general-search-managed
.e-search,
.fc-general-search-managed
.e-search-form {
    overflow: visible !important;
}


/* Hard client-side cap. */
.fc-general-search-managed
.fc-search-result-over-limit {
    display: none !important;
}


/* Result list keeps Elementor template layout. */
.fc-general-search-managed
.e-search-results-list {
    width: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}


/* =========================================================
   Output and footer
   ========================================================= */

.fc-general-search-managed
output.e-search-results-container.fc-search-results-shell {
    isolation: isolate !important;
    z-index: var(--fc-search-layer) !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    max-height: none !important;

    overflow: visible !important;
    box-sizing: border-box !important;
}


.fc-general-search-managed
output.e-search-results-container
> .e-search-results.fc-search-results-viewport {
    position: relative !important;
    z-index: 1 !important;

    flex: 1 1 auto !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y !important;
    scrollbar-gutter: stable;

    box-sizing: border-box !important;
}


/* Only a direct child of output is a valid footer. */
.fc-general-search-managed
output.e-search-results-container
> .fc-search-results-footer {
    position: relative !important;
    inset: auto !important;
    z-index: 2147483646 !important;

    flex: 0 0 var(--fc-search-footer-height) !important;

    display: block !important;

    width: 100% !important;
    min-width: 0 !important;
    min-height: var(--fc-search-footer-height) !important;

    margin: 0 !important;
    padding: 0 !important;

    border-top: 1px solid rgba(30, 30, 30, 0.20) !important;
    background: #ffffff !important;
    box-shadow: 0 -7px 16px rgba(0, 0, 0, 0.14) !important;

    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;

    box-sizing: border-box !important;
}


.fc-general-search-managed
output.e-search-results-container
> .fc-search-results-footer[hidden] {
    display: none !important;
}


/*
 * Any old nested Footer is hidden immediately, even before
 * JavaScript removes it from the DOM.
 */
.fc-general-search-managed
.e-search-results
.fc-search-results-footer,
.fc-general-search-managed
.fc-search-results-footer-floating {
    display: none !important;
}


.fc-general-search-managed
.fc-search-results-all-link {
    position: relative !important;
    z-index: 2147483647 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-height: var(--fc-search-footer-height) !important;
    padding: 9px 14px !important;

    color: #333333 !important;
    background: #ffffff !important;

    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;

    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;

    box-sizing: border-box !important;
}


/* Re-enable the valid direct Footer after the nested-Footer rule. */
.fc-general-search-managed
output.e-search-results-container
> .fc-search-results-footer {
    display: block !important;
}


.fc-general-search-managed
.fc-search-results-all-link:hover,
.fc-general-search-managed
.fc-search-results-all-link:focus-visible {
    background: #f7f7f7 !important;
    text-decoration: none !important;
    outline: none !important;
}


.fc-general-search-managed
output.e-search-results-container
> .e-search-loader {
    z-index: 10 !important;
}


/* =========================================================
   Desktop
   ========================================================= */

@media (min-width: 768px) {

    /*
     * position, top, left and width are applied inline by V2.19.4
     * after calculating viewport-safe values.
     */
    .fc-general-search-managed.fc-search-widget-open {
        position: fixed !important;
        right: auto !important;
        margin: 0 !important;
        transform: none !important;
    }


    .fc-general-search-managed
    > .elementor-widget-container,
    .fc-general-search-managed
    .e-search,
    .fc-general-search-managed
    .e-search-form {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }


    .fc-general-search-managed
    .e-search-form {
        position: relative !important;

        display: grid !important;
        grid-template-columns:
            minmax(0, 1fr)
            48px !important;
        grid-template-areas:
            "field submit" !important;

        align-items: stretch !important;

        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;

        overflow: visible !important;
        box-sizing: border-box !important;
    }


    .fc-general-search-managed
    .e-search-label {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
    }


    .fc-general-search-managed
    .e-search-input-wrapper {
        grid-area: field !important;

        position: relative !important;
        z-index: 20 !important;

        display: block !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 48px !important;

        margin: 0 !important;

        overflow: visible !important;
        pointer-events: auto !important;

        box-sizing: border-box !important;
    }


    .fc-general-search-managed
    .e-search-input {
        position: relative !important;
        z-index: 1 !important;

        display: block !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 48px !important;

        margin: 0 !important;

        pointer-events: auto !important;
        box-sizing: border-box !important;
    }


    .fc-general-search-managed
    .e-search-input-wrapper
    > svg {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;

        z-index: 4 !important;

        width: 15px !important;
        min-width: 15px !important;
        max-width: 15px !important;
        height: 15px !important;
        min-height: 15px !important;
        max-height: 15px !important;

        pointer-events: auto !important;
    }


    .fc-general-search-managed
    .e-search-submit {
        grid-area: submit !important;

        position: relative !important;
        inset: auto !important;
        z-index: 21 !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        min-height: 48px !important;

        margin: 0 !important;
        pointer-events: auto !important;

        box-sizing: border-box !important;
    }


    .fc-general-search-managed
    .e-search-submit
    svg {
        width: 24px !important;
        max-width: 24px !important;
        height: 24px !important;
        max-height: 24px !important;
    }


    .fc-general-search-managed
    .e-search-results-container {
        position: absolute !important;
        top: calc(100% + 1px) !important;
        right: 0 !important;
        bottom: auto !important;
        left: 0 !important;

        z-index: var(--fc-search-layer) !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;

        margin: 0 !important;

        background: #ffffff !important;
        box-sizing: border-box !important;
    }


    .fc-general-search-managed
    output.e-search-results-container
    > .e-search-results.fc-search-results-viewport {
        max-height:
            calc(
                min(70vh, 620px) -
                var(--fc-search-footer-height)
            ) !important;
    }


    .fc-general-search-managed
    .e-search-form
    > input[type="hidden"] {
        display: none !important;
    }
}


/* =========================================================
   Mobile — V2.19.3 layout preserved
   ========================================================= */

@media (max-width: 767px) {

    .fc-general-search-managed {
        --fc-search-footer-height: 44px;
    }


    .fc-header-search-widget.fc-search-widget-open
    .e-search-form {
        position: relative !important;

        display: grid !important;
        grid-template-columns:
            minmax(0, 1fr)
            44px !important;
        grid-template-areas:
            "field submit"
            "results results" !important;

        align-items: stretch !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;

        margin: 0 !important;
        gap: 0 !important;

        overflow: visible !important;
        box-sizing: border-box !important;
    }


    .fc-header-search-widget.fc-search-widget-open
    .e-search-label {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
    }


    .fc-header-search-widget.fc-search-widget-open
    .e-search-input-wrapper {
        grid-area: field !important;

        position: relative !important;
        z-index: 20 !important;

        display: block !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 44px !important;

        margin: 0 !important;

        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;

        overflow: visible !important;
        box-sizing: border-box !important;
    }


    .fc-header-search-widget.fc-search-widget-open
    .e-search-input {
        position: relative !important;
        z-index: 1 !important;

        display: block !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 44px !important;

        margin: 0 !important;

        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;

        touch-action: manipulation !important;
        user-select: text !important;
        -webkit-user-select: text !important;

        box-sizing: border-box !important;
    }


    .fc-header-search-widget.fc-search-widget-open
    .e-search-input-wrapper
    > svg {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;

        z-index: 4 !important;

        width: 14px !important;
        min-width: 14px !important;
        max-width: 14px !important;
        height: 14px !important;
        min-height: 14px !important;
        max-height: 14px !important;

        pointer-events: auto !important;
    }


    .fc-header-search-widget.fc-search-widget-open
    .e-search-submit {
        grid-area: submit !important;

        position: relative !important;
        inset: auto !important;
        z-index: 21 !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        min-height: 44px !important;

        margin: 0 !important;

        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;

        box-sizing: border-box !important;
    }


    .fc-header-search-widget.fc-search-widget-open
    .e-search-results-container {
        grid-area: results !important;

        position: relative !important;
        inset: auto !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;

        margin: 0 !important;

        box-sizing: border-box !important;
    }


    .fc-general-search-managed
    output.e-search-results-container
    > .e-search-results.fc-search-results-viewport {
        max-height:
            calc(
                min(58dvh, 460px) -
                var(--fc-search-footer-height)
            ) !important;
    }


    .fc-general-search-managed
    .fc-search-results-all-link {
        padding: 8px 12px !important;
        font-size: 11px !important;
    }


    .fc-header-search-widget.fc-search-widget-open
    .e-search-form
    > input[type="hidden"] {
        display: none !important;
    }
}

/* =========================================================
   V2.19.5 — Footer ownership follows focused/edited widget
   ========================================================= */

.fc-general-search-managed.fc-search-widget-active {
    z-index: var(--fc-search-layer) !important;
}


/*
 * A managed responsive copy that is not the active owner
 * must never display a Footer, even before JavaScript removes it.
 */
.fc-general-search-managed:not(.fc-search-widget-active)
output.e-search-results-container
> .fc-search-results-footer {
    display: none !important;
}


.fc-general-search-managed.fc-search-widget-active
output.e-search-results-container
> .fc-search-results-footer {
    display: block !important;
}

