/**
 * ALFIE VOICE INTERFACE STYLES
 * Friendly neighbor Aussie AI assistant - Voice & Text input
 */

/* Input Mode Tabs */
.input-mode-tab {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 2px solid transparent;
}

.input-mode-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.input-mode-tab.active {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

/* Voice Input Styles */
.voice-input {
    display: block;
}

.voice-input.hidden,
.text-input.hidden {
    display: none;
}

/* Microphone Button */
.mic-button {
    position: relative;
    cursor: pointer;
}

.mic-button:hover {
    transform: scale(1.05);
}

.mic-button:active {
    transform: scale(0.95);
}

/* Recording state */
.mic-button.recording {
    animation: pulse 1.5s infinite;
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 30px rgba(239, 68, 68, 0);
    }
}

/* Pulse ring animation (when idle) */
.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(236, 72, 153, 0.6);
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    pointer-events: none;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Hide pulse ring when recording */
.mic-button.recording .pulse-ring {
    display: none;
}

/* Voice Status Text */
#voice-status {
    transition: all 0.3s ease;
}

#voice-status.listening {
    color: #fbbf24;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

#voice-status.processing {
    color: #60a5fa;
    font-weight: 700;
}

/* Voice Transcript */
#voice-transcript {
    min-height: 28px;
    transition: all 0.3s ease;
}

#voice-transcript:not(:empty) {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Text Input Area */
.text-input {
    display: block;
}

#alfie-text-input {
    font-family: inherit;
}

#alfie-text-input::placeholder {
    font-style: italic;
}

#alfie-text-input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: #ec4899;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

/* Example Command Cards */
.example-command-card {
    cursor: pointer;
    user-select: none;
}

.example-command-card:active {
    transform: scale(0.98);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .mic-button {
        width: 120px !important;
        height: 120px !important;
    }
    
    .mic-button i {
        font-size: 3rem !important;
    }
    
    .input-mode-tab {
        flex: 1;
        justify-content: center;
    }
}

/* Accessibility */
.mic-button:focus {
    outline: 3px solid rgba(236, 72, 153, 0.5);
    outline-offset: 4px;
}

#alfie-text-input:focus {
    outline: none;
}

/* Loading Spinner for Processing */
.alfie-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Conversation Bubble (for responses) */
.alfie-response {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 16px;
    padding: 16px 20px;
    margin-top: 16px;
    text-align: left;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alfie-response p {
    color: white;
    margin: 0;
    line-height: 1.6;
}

/* Browser Compatibility Notice */
.browser-notice {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 16px;
    color: #fbbf24;
    font-size: 0.875rem;
}

.browser-notice i {
    margin-right: 8px;
}
