/* UkrFlix DLE 20: isolated compatibility and accessibility layer. */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.has-search-open {
    overflow: hidden;
}

.voice-search-btn {
    position: relative;
}

.voice-search-btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
}

.voice-search-btn.is-listening {
    color: #ef4444;
    animation: uf-voice-pulse 1.2s ease-in-out infinite;
}

.voice-search-btn.is-listening::after {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px solid currentColor;
    border-radius: inherit;
    opacity: 0.55;
}

.form-status {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.85rem;
}

.form-status--error { color: #f87171; }
.form-status--progress { color: #60a5fa; }
.form-status--ok { color: #4ade80; }

@keyframes uf-voice-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
    .voice-search-btn.is-listening { animation: none; }
}
