/* ═══════════════════════════════════════════════
   Voice Commands — Public Portal (MD3 Design)
   ═══════════════════════════════════════════════ */

/* ── Header Mic Toggle ── */
.vc-header-btn {
    position: relative;
}

.vc-header-btn .vc-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--md-sys-color-error);
    animation: vc-dot-pulse 1.2s infinite;
}

@keyframes vc-dot-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

/* ── Mic Button in Search Bar (bottom nav) ── */
.vc-search-mic {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: var(--md-sys-shape-full, 50%);
    border: none;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.2s var(--md-sys-motion-easing-standard),
                color 0.2s var(--md-sys-motion-easing-standard),
                box-shadow 0.2s var(--md-sys-motion-easing-standard),
                transform 0.15s var(--md-sys-motion-easing-standard);
}

.vc-search-mic .material-symbols-rounded {
    font-size: 18px;
}

.vc-search-mic:hover {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    transform: scale(1.08);
}

.vc-search-mic:active {
    transform: scale(0.94);
}

/* Active / listening state */
.vc-search-mic--active {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
    animation: vc-search-mic-pulse 1.5s ease-in-out infinite;
}

.vc-search-mic--active:hover {
    background: var(--md-sys-color-error);
    color: var(--md-sys-color-on-error);
}

@keyframes vc-search-mic-pulse {
    0%   { box-shadow: 0 0 0 0 var(--md-sys-color-error-container); }
    50%  { box-shadow: 0 0 0 5px transparent; }
    100% { box-shadow: 0 0 0 0 var(--md-sys-color-error-container); }
}

/* ── Voice Status Indicator (floating) ── */
.vc-status {
    position: fixed;
    bottom: calc(var(--md-sys-layout-bottom-nav-h, 64px) + 48px + env(safe-area-inset-bottom, 0px) + 24px);
    right: 16px;
    z-index: calc(var(--md-sys-z-fab, 700) + 1);
    background: var(--md-sys-color-inverse-surface);
    color: var(--md-sys-color-inverse-on-surface);
    padding: 8px 16px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    max-width: 280px;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.vc-status--visible {
    opacity: 1;
    transform: translateY(0);
}

.vc-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.vc-status__dot--listening {
    background: var(--md-sys-color-success, #4caf50);
    animation: vc-dot-pulse 1.2s infinite;
}

.vc-status__dot--processing {
    background: var(--md-sys-color-warning, #ff9800);
    animation: vc-dot-pulse 0.5s infinite;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .vc-status {
        bottom: calc(var(--md-sys-layout-bottom-nav-h, 64px) + 48px + env(safe-area-inset-bottom, 0px) + 16px);
        right: 12px;
        font-size: 12px;
        padding: 6px 12px;
        max-width: 240px;
    }
}
