/* Explain: Styles for the floating voice search button and its status messages. */
/* ---------- زر البحث الصوتي العائم ---------- */
.voice-widget {
    position: fixed;
    inset-inline-end: 1rem;
    bottom: 1.2rem;
    z-index: 68;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
}

.voice-launcher {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--gold-soft), var(--primary-color));
    color: #0b1220;
    font-size: 1.4rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 12px 26px -10px rgba(212, 175, 55, 0.7);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.voice-launcher:hover {
    transform: scale(1.08);
    background: linear-gradient(135deg, #f2d479, var(--primary-hover));
}

.voice-launcher:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.5);
}

.voice-launcher.is-recording {
    background: linear-gradient(135deg, #f26a6a, #d43b3b);
    color: #ffffff;
    animation: voiceLauncherPulse 1.3s ease-in-out infinite;
}

.voice-status {
    max-width: min(78vw, 300px);
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    background: rgba(16, 26, 46, 0.97);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.82rem;
    line-height: 1.75;
    box-shadow: var(--shadow-card);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.voice-status.is-shown { opacity: 1; transform: none; }
.voice-status.is-error { border-color: rgba(239, 68, 68, 0.5); color: #fca5a5; }

body.player-active .voice-widget { bottom: 7.5rem; }

@keyframes voiceLauncherPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 74, 74, 0.55); }
    50% { box-shadow: 0 0 0 12px rgba(212, 74, 74, 0); }
}

@media (max-width: 480px) {
    .voice-widget { inset-inline-end: 0.75rem; bottom: 1rem; }
    body.player-active .voice-widget { bottom: 7.5rem; }
}