/* Native search navigation stays usable without JavaScript. */
button[data-wlv-search-busy] { position: relative !important; cursor: progress !important; }
button[data-wlv-search-busy] > svg.wlv-search-progress {
    position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important;
    max-width: none !important; margin: 0 !important; pointer-events: none; overflow: visible;
    fill: none !important; color: #a5f3fc;
}
button[data-wlv-search-busy] > svg.wlv-search-progress > rect {
    width: calc(100% - 4px); height: calc(100% - 4px); fill: none;
    stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 24 76;
    filter: drop-shadow(0 0 3px #38bdf8);
    animation: wlv-search-clockwise 1.5s linear infinite;
}
/* SVG rectangles trace clockwise; decreasing offset moves the light forward. */
@keyframes wlv-search-clockwise { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }
.wlv-search-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
    button[data-wlv-search-busy] > svg.wlv-search-progress > rect { animation: none; stroke-dasharray: none; }
}
@media (forced-colors: active) {
    button[data-wlv-search-busy] > svg.wlv-search-progress > rect { stroke: Highlight; filter: none; }
}

/* Reserve the wider label without displaying the old text during navigation. */
button[data-wlv-search-busy]:has(.wlv-search-pending) { display: inline-grid; align-items: center; justify-items: center; }
button[data-wlv-search-busy] > .wlv-search-original,
button[data-wlv-search-busy] > .wlv-search-pending { grid-area: 1 / 1; }
button[data-wlv-search-busy] > .wlv-search-original { visibility: hidden; }
button[data-wlv-search-busy] > .wlv-search-pending { white-space: nowrap; }
