.voice-dictation-control[hidden] {
    display: none;
}

.voice-dictation-control {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 95;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-dictation-status {
    max-width: min(360px, calc(100vw - 120px));
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.voice-dictation-status:empty {
    display: none;
}

.voice-dictation-button {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
    cursor: pointer;
}

.voice-dictation-button:hover {
    transform: translateY(-1px);
}

.voice-dictation-button:focus-visible {
    outline: 3px solid rgba(0, 0, 0, .22);
    outline-offset: 3px;
}

.voice-dictation-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.voice-dictation-control.is-listening .voice-dictation-button {
    background: #8b1f1f;
    animation: voice-dictation-pulse 1.35s ease-in-out infinite;
}

.voice-dictation-control.is-error .voice-dictation-status {
    color: #8b1f1f;
}

@keyframes voice-dictation-pulse {
    0%, 100% { box-shadow: 0 12px 32px rgba(0, 0, 0, .22), 0 0 0 0 rgba(139, 31, 31, .22); }
    50% { box-shadow: 0 12px 32px rgba(0, 0, 0, .22), 0 0 0 10px rgba(139, 31, 31, 0); }
}

@media (max-width: 760px), (pointer: coarse) {
    .voice-dictation-control {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .voice-dictation-control.is-listening .voice-dictation-button {
        animation: none;
    }
}
