.primavera-voice-search-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.primavera-voice-search-input {
    width: 100%;
    padding-right: 46px !important;
}

.primavera-voice-search-button {
    position: absolute;
    top: 50%;
    right: 8px;
    z-index: 5;

    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #222;

    cursor: pointer;
    transform: translateY(-50%);
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.primavera-voice-search-button:hover,
.primavera-voice-search-button:focus-visible {
    background-color: rgba(0, 0, 0, 0.08);
    color: #000;
    outline: none;
}

.primavera-voice-search-button:focus-visible {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.primavera-voice-search-button.is-listening {
    color: #c62828;
    background-color: rgba(198, 40, 40, 0.12);
    animation: primavera-voice-pulse 1.2s infinite;
}

.primavera-voice-search-message {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 99999;

    width: max-content;
    max-width: 280px;
    padding: 7px 10px;

    border-radius: 4px;
    background: #111;
    color: #fff;

    font-size: 12px;
    line-height: 1.4;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.primavera-voice-search-message--error {
    background: #a71919;
}

.primavera-voice-search-message--listening {
    background: #222;
}

.primavera-voice-search-unsupported
    .primavera-voice-search-button {
    display: none !important;
}

@keyframes primavera-voice-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.35);
    }

    70% {
        box-shadow: 0 0 0 9px rgba(198, 40, 40, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(198, 40, 40, 0);
    }
}

@media (max-width: 767px) {
    .primavera-voice-search-button {
        width: 38px;
        height: 38px;
        right: 5px;
    }

    .primavera-voice-search-input {
        padding-right: 50px !important;
    }
}