/* Power Voice - componente global de ditado */
.power-voice-enabled-field {
    padding-right: 42px !important;
}

.power-voice-button {
    position: absolute;
    z-index: 99998;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(31, 49, 71, .14);
    border-radius: 9px;
    color: #5f6f82;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 8px rgba(24, 39, 57, .08);
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
    -webkit-tap-highlight-color: transparent;
}


.power-voice-editor-enabled {
    position: relative;
}

.power-voice-button.is-editor-button {
    z-index: 100100;
}

.power-voice-button:hover,
.power-voice-button:focus-visible {
    color: #7a5d20;
    border-color: rgba(167, 126, 42, .36);
    background: #fffaf0;
    box-shadow: 0 4px 12px rgba(24, 39, 57, .12);
    outline: none;
}

.power-voice-button:active {
    transform: scale(.95);
}

.power-voice-button svg {
    width: 17px;
    height: 17px;
    pointer-events: none;
}

.power-voice-button.is-listening {
    color: #7a5a00;
    border-color: rgba(201, 154, 27, .42);
    background: #fff8e6;
    box-shadow: 0 0 0 4px rgba(201, 154, 27, .10), 0 4px 12px rgba(24, 39, 57, .11);
    animation: powerVoicePulse 1.55s ease-in-out infinite;
}

.power-voice-button.is-error {
    color: #8d2d3e;
    border-color: rgba(170, 48, 70, .28);
    background: #fff5f6;
}

.power-voice-live-status {
    position: fixed;
    z-index: 999999;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 14px);
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: min(92vw, 440px);
    padding: 10px 14px;
    border: 1px solid rgba(29, 44, 62, .11);
    border-radius: 999px;
    color: #33465b;
    background: rgba(255,255,255,.97);
    box-shadow: 0 12px 34px rgba(24,39,57,.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    font: 600 13px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.power-voice-live-status.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.power-voice-live-status.is-listening::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #b8860b;
    box-shadow: 0 0 0 4px rgba(184,134,11,.11);
}

.power-voice-live-status.is-error {
    color: #842b3d;
    background: #fff5f7;
}

@keyframes powerVoicePulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(184,134,11,.07), 0 4px 12px rgba(24,39,57,.10); }
    50% { box-shadow: 0 0 0 7px rgba(184,134,11,.12), 0 4px 12px rgba(24,39,57,.13); }
}

@media (max-width: 782px) {
    .power-voice-button {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .power-voice-enabled-field {
        padding-right: 46px !important;
    }

    .power-voice-live-status {
        bottom: 18px;
        max-width: calc(100vw - 28px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .power-voice-button,
    .power-voice-live-status {
        transition: none;
    }
    .power-voice-button.is-listening {
        animation: none;
    }
}
