/* Voice Stuff */
/* Voice Control Buttons */
#robios-avatar-voice-trigger-btn {
    position: absolute;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background: #2196F3;

}

#robios-avatar-voice-stop-btn {
    position: absolute;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background: #f44336;  /* Red color when listening */
    animation: pulse-light 6s infinite;

}

#robios-avatar-voice-trigger-btn:hover {
    background: #1976D2;
    transform: scale(1.1);
}

#robios-avatar-voice-trigger-btn:active {
    transform: scale(0.95);
}


#robios-avatar-voice-stop-btn.robios-avatar-voice-visualizer {
    display: none;
}


/* Voice Button Positions */
#robios-avatar-voice-trigger-btn {
    left: 20px;
}

#robios-avatar-voice-stop-btn {
    left: 80px;
}



@keyframes fadeInCheck {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}



/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes pulse-light {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(244, 67, 54, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
    }
} 

#robios-avatar-voice-visualizer {
    position: absolute;
    bottom: 120px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    z-index: 1000000; /* Increased to be higher than any other element (100000+) */
    background-color: rgba(196, 225, 249, 0.349);
    display: none;
    pointer-events: none;
    transform: translate(0, 50%); /* Move down by half its height to center align */
}

#robios-avatar-voice-visualizer.active {
    display: block;
}


#robios-avatar-voice-results.partial {
    background-color: rgba(33, 150, 243, 0.2); /* Blue background for partial results */
}

#robios-avatar-voice-results.final {
    background-color: rgba(76, 175, 80, 0.4); /* Green background for final results */
    font-weight: 500;
}



#robios-avatar-voice-visualizer.hidden {
    display: none;
}

#robios-avatar-voice-visualizer::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid #2196F3;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Voice Results Display */
#robios-avatar-voice-results {
    position: absolute;
    bottom: 20px;
    left: 80px;
    color: white;
    padding: 8px 16px;
    padding-right: 35px;
    border-radius: 20px;
    font-family: 'Jura', Verdana, sans-serif;
    font-size: 15px;
    font-weight: 400;
    max-width: min(600px, calc(100vw - 180px));
    min-width: 100px;
    width: fit-content;
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    line-height: 1.4;
    visibility: block;
}

#robios-avatar-voice-results.hidden {
    display: none;
}

/* Success checkmark styles */
.success-check {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #3498db; /* Bright blue */
    font-size: 22px; /* Slightly larger */
    display: inline-block;
    z-index: 2;
    margin-left: 8px;
    text-shadow: 
        0 0 5px rgba(52, 152, 219, 0.8),
        0 0 10px rgba(52, 152, 219, 0.5);
    font-weight: bold;
}

#robios-avatar-voice-results.final .success-check {
    animation: fadeInCheck 0.3s ease forwards;
}

/* Android Instructions Modal */
.android-voice-instructions {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.instructions-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.instructions-content h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.instructions-content ol {
    margin: 15px 0;
    padding-left: 20px;
    color: #444;
}

.instructions-content li {
    margin-bottom: 8px;
}

.close-instructions {
    display: block;
    width: 100%;
    padding: 10px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    margin-top: 15px;
    cursor: pointer;
    font-weight: 500;
}

.close-instructions:hover {
    background: #1976d2;
}

#robios-avatar-voice-trigger-btn.recognition-disabled {
    background-color: grey !important; /* Added !important for testing */
    color: #ccc; /* Lighter text color for contrast */
    opacity: 0.7; /* Slightly faded */
    cursor: not-allowed; /* Indicate it's not clickable */
}
