:where(.f12).f12-search-route,
:where(.f12) .f12-search-route {
    --f12-search-surface: #fcfcfc;
    --f12-search-border: rgba(17, 17, 17, 0.12);
    --f12-search-border-soft: rgba(45, 45, 45, 0.08);
    --f12-search-copy: var(--f12-color-text, #151516);
    color: var(--f12-search-copy);
}

:where(.f12) .f12-search-route__controls-shell {
    background: transparent;
    border-bottom: 0;
}

:where(.f12) .f12-search-route__controls {
    width: min(820px, calc(100% - 2rem));
    max-width: none; /* match results and standard site content width */
    margin-inline: auto;
    padding-block: var(--f12-space-10) var(--f12-space-4);
    display: grid;
    gap: var(--f12-space-5);
}

:where(.f12) .f12-search-route__chips-wrap {
    position: relative;
    min-width: 0;
    z-index: 5;
}

:where(.f12) .f12-search-route__filters {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

:where(.f12) .f12-search-route__filters-inline {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

:where(.f12) .f12-search-route__filter-menu {
    position: relative;
    flex: 0 0 auto;
}

:where(.f12) .f12-search-route__filter-menu[open] {
    z-index: 20;
}

:where(.f12) .f12-search-route__filters.is-ready:not(.is-overflowing) .f12-search-route__filter-menu {
    display: none;
}

:where(.f12) .f12-search-route__filter-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    min-height: 0;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid var(--f12-color-border-subtle);
    border-radius: 50%;
    background: var(--f12-color-surface-card);
    color: var(--f12-color-text-primary);
    font-size: var(--f12-font-size-sm);
    font-weight: var(--f12-font-weight-bold);
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--f12-shadow-surface-subtle);
    list-style: none;
    transition:
        border-color var(--f12-duration-normal, 280ms) var(--f12-ease-standard, ease),
        box-shadow var(--f12-duration-normal, 280ms) var(--f12-ease-standard, ease),
        transform var(--f12-duration-normal, 280ms) var(--f12-ease-standard, ease);
}

:where(.f12) .f12-search-route__filter-trigger::-webkit-details-marker {
    display: none;
}

:where(.f12) .f12-search-route__filter-trigger:hover,
:where(.f12) .f12-search-route__filter-menu[open] .f12-search-route__filter-trigger {
    border-color: var(--f12-color-text-primary);
    box-shadow: var(--f12-shadow-1);
}

:where(.f12) .f12-search-route__filter-trigger:hover {
    transform: translateY(-1px);
}

:where(.f12) .f12-search-route__filter-icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

:where(.f12) .f12-search-route__filter-panel {
    position: absolute;
    top: calc(100% + 0.625rem);
    right: 0;
    width: min(24rem, calc(100vw - 2rem));
    padding: var(--f12-space-3);
    border: 1px solid var(--f12-color-border-subtle);
    border-radius: var(--f12-radius-2);
    background: var(--f12-color-surface-card);
    box-shadow: var(--f12-shadow-surface-raised);
}

:where(.f12) .f12-search-route__chips-wrap .ep-chips {
    gap: var(--f12-space-3);
}

:where(.f12) .f12-search-route__chips-wrap .f12-search-route__chips--inline .ep-chips-list {
    flex-wrap: nowrap;
    gap: 0.625rem;
    overflow: hidden;
    padding: 0 1px 4px 0;
}

:where(.f12) .f12-search-route__chips-wrap .f12-search-route__chips--inline .f12-chip.is-overflow-hidden {
    display: none;
}

:where(.f12) .f12-search-route__chips-wrap .ep-chips-list {
    flex-wrap: wrap;
    gap: 0.5rem;
    overflow: visible;
    padding: 0;
}

:where(.f12) .f12-search-route__chips-wrap .ep-chips-list .f12-chip {
    flex: 0 0 auto;
}

:where(.f12) .f12-search-route__chips-wrap .f12-chip--filter.is-active {
    background: var(--f12-color-brand-editorial);
    border-color: var(--f12-color-brand-editorial);
    color: var(--f12-color-brand-editorial-contrast);
    box-shadow: 0 8px 18px -14px rgba(166, 32, 26, 0.55);
}

:where(.f12) .f12-search-route__chips-wrap .f12-chip--filter.is-active:hover {
    background: #8f180d;
    border-color: #8f180d;
    color: var(--f12-color-brand-editorial-contrast);
}

:where(.f12) .f12-search-route__search-wrap {
    width: 100%;
}

:where(.f12) .f12-search-route__search-wrap .ep-search-form {
    width: 100%;
}

:where(.f12) .f12-search-route__results-shell {
    padding-block: var(--f12-space-3) var(--f12-space-12);
}

:where(.f12) .f12-search-route__results {
    width: min(820px, calc(100% - 2rem));
    max-width: none;
    margin-inline: auto;
    display: grid;
    gap: var(--f12-space-3);
    position: relative;
}

:where(.f12) .f12-search-route__results::before {
    content: "";
    position: absolute;
    top: -0.75rem;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: var(--f12-radius-pill);
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(166, 32, 26, 0.14) 20%,
        var(--f12-color-brand-editorial) 50%,
        rgba(166, 32, 26, 0.14) 80%,
        transparent 100%
    );
    opacity: 0;
    transform: translateX(-35%);
    pointer-events: none;
}

:where(.f12).f12-search-route.is-loading .f12-search-route__results::before,
:where(.f12) .f12-search-route.is-loading .f12-search-route__results::before {
    opacity: 1;
    animation: f12-search-route-loading 1.1s ease-in-out infinite;
}

:where(.f12).f12-search-route.is-loading .f12-search-route__summary,
:where(.f12).f12-search-route.is-loading .f12-search-route__results-list,
:where(.f12).f12-search-route.is-loading .f12-search-route__pagination,
:where(.f12) .f12-search-route.is-loading .f12-search-route__summary,
:where(.f12) .f12-search-route.is-loading .f12-search-route__results-list,
:where(.f12) .f12-search-route.is-loading .f12-search-route__pagination {
    opacity: 0.48;
    transition: opacity var(--f12-duration-fast, 150ms) ease;
}

@keyframes f12-search-route-loading {
    0% {
        transform: translateX(-45%);
    }

    100% {
        transform: translateX(45%);
    }
}

:where(.f12) .f12-search-route__summary {
    color: var(--f12-color-text-muted);
    font-size: var(--f12-font-size-sm, 0.95rem);
    line-height: 1.5;
    text-align: right;
}

:where(.f12) .f12-search-route__summary strong {
    color: var(--f12-search-copy);
    font-weight: 600;
}

:where(.f12) .f12-search-route__results-list {
    display: grid;
}

:where(.f12) .f12-search-route__result {
    display: grid;
    grid-template-columns: minmax(120px, 200px) minmax(0, 1fr) auto;
    gap: var(--f12-space-5);
    align-items: center;
    padding-block: 1rem 1.125rem;
    border-bottom: 1px solid var(--f12-search-border-soft, rgba(45, 45, 45, 0.08));
}

:where(.f12) .f12-search-route__result:last-child {
    border-bottom: 0;
}

:where(.f12) .f12-search-route__result-media {
    display: block;
    align-self: start;
    border-radius: var(--f12-radius-md, 0.5rem);
    overflow: hidden;
    background: rgba(17, 17, 17, 0.04);
}

:where(.f12) .f12-search-route__result-media--placeholder {
    aspect-ratio: 16 / 9;
}

:where(.f12) .f12-search-route__result-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transform: scale(1);
    transition: transform var(--f12-duration-normal, 300ms) var(--f12-ease-standard, ease);
}

:where(.f12) .f12-search-route__result-media:hover .f12-search-route__result-image,
:where(.f12) .f12-search-route__result-media:focus-visible .f12-search-route__result-image {
    transform: scale(1.05);
}

:where(.f12) .f12-search-route__result-body {
    display: grid;
    gap: var(--f12-space-2);
    align-content: center;
}

/* Title link behaviour — DS f12-title covers typography/Elementor compat */
:where(.f12) .f12-search-route__result-title a {
    color: inherit;
    text-decoration: none;
}

:where(.f12) .f12-search-route__result-title a:hover,
:where(.f12) .f12-search-route__result-title a:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.12em;
}

:where(.f12) .f12-search-route__result-cta {
    background: var(--f12-color-surface-card);
    box-shadow: var(--f12-shadow-surface-subtle);
    transition:
        transform var(--f12-duration-normal, 280ms) var(--f12-ease-standard, ease),
        background var(--f12-duration-normal, 280ms) var(--f12-ease-standard, ease),
        border-color var(--f12-duration-normal, 280ms) var(--f12-ease-standard, ease),
        color var(--f12-duration-normal, 280ms) var(--f12-ease-standard, ease),
        box-shadow var(--f12-duration-normal, 280ms) var(--f12-ease-standard, ease);
}

:where(.f12) .f12-search-route__result-cta:hover,
:where(.f12) .f12-search-route__result-cta:focus-visible {
    border-color: var(--f12-color-text-primary);
    box-shadow: var(--f12-shadow-1);
}

/* Keyword highlight */
:where(.f12) .f12-search-route__result-title mark.ep-highlight,
:where(.f12) .f12-search-route__result-excerpt mark.ep-highlight {
    background: #FCF3A3;
    color: inherit;
    border-radius: 0.15em;
    padding-inline: 0.15em;
}

:where(.f12) .f12-search-route__empty {
    padding-block: var(--f12-space-8);
    border-top: 1px solid var(--f12-search-border);
}

:where(.f12) .f12-search-route__pagination {
    padding-top: var(--f12-space-4);
}

:where(.f12) .f12-search-route__pagination-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    padding: 0;
    margin: 0;
}

:where(.f12) .f12-search-route__pagination-item {
    margin: 0;
}

:where(.f12) .f12-search-route__pagination-item .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    min-height: 2.35rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--f12-color-border-subtle);
    border-radius: var(--f12-radius-pill);
    background: var(--f12-color-surface-card);
    color: var(--f12-color-text-muted);
    text-decoration: none;
    font-size: var(--f12-font-size-sm, 0.9rem);
    font-weight: var(--f12-font-weight-bold, 700);
    line-height: 1;
    box-shadow: var(--f12-shadow-surface-subtle);
    transition: all var(--f12-duration-normal, 280ms) var(--f12-ease-standard, ease);
}

:where(.f12) .f12-search-route__pagination-item a.page-numbers:hover,
:where(.f12) .f12-search-route__pagination-item a.page-numbers:focus-visible {
    border-color: var(--f12-color-text-primary);
    color: var(--f12-color-text-primary);
    box-shadow: var(--f12-shadow-1);
}

:where(.f12) .f12-search-route__pagination-item .page-numbers.current {
    background: var(--f12-color-brand-editorial);
    border-color: var(--f12-color-brand-editorial);
    color: var(--f12-color-brand-editorial-contrast);
    box-shadow: 0 8px 18px -14px rgba(166, 32, 26, 0.55);
}

:where(.f12) .f12-search-route__pagination-item .page-numbers.dots {
    min-width: auto;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 767px) {
    :where(.f12) .f12-search-route__controls {
        padding-block: var(--f12-space-8) var(--f12-space-3);
        grid-template-columns: 1fr;
        gap: var(--f12-space-3);
    }

    :where(.f12) .f12-search-route__filter-trigger {
        width: 2.65rem;
        height: 2.65rem;
        justify-content: center;
    }

    :where(.f12) .f12-search-route__filter-menu {
        position: static;
    }

    :where(.f12) .f12-search-route__filter-panel {
        left: 0;
        right: 0;
        width: 100%;
        box-sizing: border-box;
        max-height: min(24rem, calc(100vh - 10rem));
        overflow-y: auto;
    }

    :where(.f12) .f12-search-route__results {
        gap: var(--f12-space-4);
    }

    :where(.f12) .f12-search-route__results-shell {
        padding-block: var(--f12-space-3) var(--f12-space-6);
    }

    :where(.f12) .f12-search-route__result {
        grid-template-columns: minmax(92px, 120px) minmax(0, 1fr);
        gap: 0.75rem;
        padding-block: 0.75rem;
    }

    :where(.f12) .f12-search-route__result-cta {
        display: none;
    }

    :where(.f12) .f12-search-route__result-excerpt {
        display: none;
    }
}
