/* ماژول تبدیل گفتار به متن */
.stt-field {
    position: relative;
}

.stt-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.stt-toolbar--with-label {
    justify-content: space-between;
}

.stt-toolbar__label {
    margin: 0;
    font-size: inherit;
}

.stt-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.stt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid #99f6e4;
    border-radius: 999px;
    background: #ecfdf5;
    color: #0f766e;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.stt-btn:hover:not(:disabled) {
    background: #ccfbf1;
    color: #115e59;
}

.stt-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.stt-btn--start.is-listening {
    border-color: #f87171;
    background: #fef2f2;
    color: #b91c1c;
    box-shadow: 0 0 0 0.2rem rgba(248, 113, 113, 0.25);
    animation: stt-pulse 1.4s ease-in-out infinite;
    opacity: 1;
}

.stt-btn--stop {
    border-color: #fecaca;
    background: #fff;
    color: #b91c1c;
}

.stt-btn--stop:hover:not(:disabled) {
    background: #fef2f2;
    color: #991b1b;
    border-color: #f87171;
}

.stt-btn--stop.is-active:not(:disabled) {
    border-color: #f87171;
    background: #fef2f2;
    color: #991b1b;
}

.stt-btn__icon {
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z'/%3E%3Cpath d='M19 10v1a7 7 0 0 1-14 0v-1'/%3E%3Cline x1='12' x2='12' y1='19' y2='22'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z'/%3E%3Cpath d='M19 10v1a7 7 0 0 1-14 0v-1'/%3E%3Cline x1='12' x2='12' y1='19' y2='22'/%3E%3C/svg%3E") center / contain no-repeat;
}

.stt-btn__icon--stop {
    border-radius: 0.15rem;
    mask: none;
    -webkit-mask: none;
}

.stt-status {
    min-height: 1.1rem;
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.5;
}

.stt-status.is-listening {
    color: #b91c1c;
    font-weight: 600;
}

.stt-status.is-error {
    color: #dc2626;
}

@keyframes stt-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0.15rem rgba(248, 113, 113, 0.2);
    }
    50% {
        box-shadow: 0 0 0 0.35rem rgba(248, 113, 113, 0.12);
    }
}
