/* Audio recorder and command helper styles */
.audio-recorder-button {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 50px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #1e88e5 0%, #42a5f5 100%);
    box-shadow: 0 8px 20px rgba(30, 136, 229, 0.24);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.audio-recorder-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(30, 136, 229, 0.30);
}

.audio-recorder-button::before {
    content: '';
    position: absolute;
    top: -150%;
    left: -150%;
    width: 300%;
    height: 300%;
    background: linear-gradient(60deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 45%, rgba(255,255,255,0) 90%);
    transform: translateX(-100%) rotate(30deg);
    opacity: 0;
    transition: transform 0.7s ease, opacity 0.5s ease;
    pointer-events: none;
}

.audio-recorder-button:hover::before {
    transform: translateX(100%) rotate(30deg);
    opacity: 1;
}

.audio-recorder-button.recording {
    background: linear-gradient(135deg, #d32f2f 0%, #ef5350 100%);
}

.audio-recorder-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(33, 33, 33, 0.08);
    color: #212121;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
}

.audio-recorder-status .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d32f2f;
    animation: audio-recorder-pulse 1.2s ease-in-out infinite;
}

@keyframes audio-recorder-pulse {
    0%, 100% { transform: scale(1); opacity: 0.82; }
    50% { transform: scale(1.4); opacity: 0.35; }
}

.audio-recorder-tooltip {
    position: absolute;
    z-index: 10;
    background: rgba(33, 33, 33, 0.92);
    color: white;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.audio-recorder-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    background: rgba(0, 0, 0, 0.88);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    z-index: 9999;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.audio-recorder-toast.show {
    opacity: 1;
    pointer-events: auto;
}

.audio-recorder-alert {
    color: white;
    padding: 14px 18px;
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    font-size: 16px;
    line-height: 1.4;
    max-width: 340px;
    white-space: pre-wrap;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    margin-bottom: 0; /* managed by container gap */
}

.audio-recorder-alert.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.audio-recorder-alert-success {
    background: #2d8546;
}

.audio-recorder-alert-error {
    background: #cc3333;
}

.audio-recorder-alert-info {
    background: #333;
}

/* Alert stacking container for waterfall effect (newer alerts above older ones, right-aligned) */
#uploadAudioBtn.processing i {
    animation: audio-recorder-pulse 1.2s ease-in-out infinite;
}

#audio-recorder-alert-container {
    position: fixed;
    bottom: 18px;
    right: 18px;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    z-index: 10000;
    align-items: flex-end;
    max-height: 70vh;
    overflow: visible;
}
