﻿.form-control.is-invalid, .was-validated .form-control:invalid {
    background-position: right 2.50rem center !important; /* move right */
}

.form-control.is-valid, .was-validated .form-control:valid {
    background-position: right 2.50rem center !important; /* move right */
}

/* Mic button inside the input on the right */
.mic-inline-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    z-index: 5;
}

    .mic-inline-btn i {
        font-size: 1.3rem;
        color: #6c757d;
    }

    .mic-inline-btn:hover i {
        color: red;
    }

/* Background Dim Layer */
.listening-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Center Popup */
.listening-popup {
    position: fixed;
    width: 300px !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85); /* smaller when hidden */
    background: #ffffff;
    padding: 35px 35px;
    border-radius: 15px;
    box-shadow: 0 0 25px rgba(0,0,0,0.25);
    text-align: center;
    z-index: 9999;
    /* Fade + scale animation */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

    /* Fade-in + pop animation */
    .listening-popup.show-popup {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1); /* zoom in */
        pointer-events: auto;
    }

.listening-overlay.show-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Pulse effect */
.pulse-circle {
    width: 35px;
    height: 35px;
    margin: 0 auto 12px;
    background: #ff3b30;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.7);
        opacity: 0;
    }
}

.listening-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

    .listening-overlay.show-overlay {
        opacity: 1;
        pointer-events: auto;
    }


.cancel-listen-btn {
    margin-top: 15px;
    background-color: #dc3545; /* Bootstrap red */
    border: none;
    padding: 8px 20px;
    color: white;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

    .cancel-listen-btn:hover {
        background-color: #bb2d3b; /* darker red */
    }