.sgc-voice-input-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 0 0 auto;
    margin-left: 8px;
    position: relative;
    vertical-align: top;
}

.sgc-voice-input-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid #2d7fc1;
    border-radius: 6px;
    background: #ffffff;
    color: #145f99;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
    white-space: nowrap;
    width: auto;
    max-width: 100%;
    align-self: flex-start;
}

.sgc-voice-input-btn:hover,
.sgc-voice-input-btn:focus {
    background: #eef7ff;
}

.sgc-voice-input-btn.is-listening {
    border-color: #b51f2e;
    color: #b51f2e;
    background: #fff4f5;
}

.sgc-voice-input-btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

/* Build 8: keep the voice button compact. Build 7's feedback width could stretch the
   button to the full feedback width in flex layouts. The button now stays content-sized. */
/* Keep voice status directly under its own Talk-to-Text button so it never overlays Send. */
.sgc-voice-input-feedback {
    display: block;
    position: static;
    width: 250px;
    max-width: min(250px, 72vw);
    box-sizing: border-box;
    margin-top: 6px;
    padding: 7px 9px;
    border: 1px solid rgba(74, 145, 196, .55);
    border-radius: 6px;
    background: #08294a;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
    font-size: 12px;
    line-height: 1.35;
}

.sgc-voice-input-feedback:empty {
    display: none;
}

@media (max-width: 700px) {
    .sgc-voice-input-wrap {
        margin-left: 6px;
    }

    .sgc-voice-input-btn {
        min-height: 34px;
        padding: 6px 9px;
        font-size: 12px;
    }

    .sgc-voice-input-feedback {
        width: 240px;
        max-width: 78vw;
    }
}

.sgc-voice-input-btn.is-processing {
    opacity: .78;
    cursor: wait;
}

/* Build 7: the shared server-backed voice plugin replaces the Companion's older browser dictation buttons. */
#sgcai-image-dictate,
#sgcai-video-dictate {
    display: none !important;
}
