/*
 * Search box clear button (static/js/search_clear.js, 2026-11-04).
 * Colours follow the box's own text colour (set by the script), so light,
 * dark, guest-portal and website themes all read without fixed colours.
 */

/* The browser's own clear button is hidden — ours is the only one. */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}
input[type="search"]::-ms-clear { display: none; width: 0; height: 0; }

/* Room for the button while the box has text. */
input.sc-has-x { padding-inline-end: 40px !important; }

.sc-x {
    position: absolute;
    z-index: 3;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-shadow: none;
    min-width: 0;
    min-height: 0;
    line-height: 1;
}
.sc-x[hidden] { display: none !important; }
.sc-x__dot {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.12;
    transition: opacity 0.12s ease;
}
.sc-x__icon { position: relative; width: 14px; height: 14px; opacity: 0.8; }
.sc-x:hover .sc-x__dot { opacity: 0.2; }
.sc-x:active .sc-x__dot { opacity: 0.28; }
.sc-x:focus { outline: none; }
.sc-x:focus-visible .sc-x__dot { opacity: 0.22; outline: 2px solid currentColor; outline-offset: 2px; }

/* "Nothing matches" line with a Show all button, used by live filters. */
.sc-none { margin: 12px 0; font-size: 14px; opacity: 0.85; }
.sc-none[hidden] { display: none !important; }
.sc-none__all {
    margin-inline-start: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    min-height: 44px;
}

@media (prefers-reduced-motion: reduce) {
    .sc-x__dot { transition: none; }
}

/* "Clear search" link under a search that found nothing. */
.sc-clear-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
