/**
 * Enhanced Voice Training Styles for TrainSmart AI
 * Styles for real-time analysis, performance monitoring, and voice features
 */

/* Performance Dashboard */
.performance-dashboard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
}

.metric-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.metric-card h6 {
    margin-bottom: 10px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.score-display {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

/* Score color indicators */
.score-excellent {
    color: #4CAF50 !important;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.score-good {
    color: #8BC34A !important;
    text-shadow: 0 0 10px rgba(139, 195, 74, 0.5);
}

.score-fair {
    color: #FFC107 !important;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.score-poor {
    color: #F44336 !important;
    text-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
}

/* Real-time Coaching Panel */
.coaching-panel {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #007bff;
}

.coaching-panel h6 {
    color: #495057;
    margin-bottom: 10px;
}

#coachingSuggestions {
    list-style: none;
    padding: 0;
    margin: 0;
}

#coachingSuggestions li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    color: #6c757d;
}

#coachingSuggestions li:last-child {
    border-bottom: none;
}

#coachingSuggestions li i {
    margin-right: 8px;
}

/* Audio Visualization */
#audioVisualization {
    width: 100%;
    height: 60px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 10px 0;
    border: 1px solid #dee2e6;
}

/* Enhanced Recording Controls */
.enhanced-recording-controls {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.recording-button {
    background: linear-gradient(45deg, #FF6B6B, #ee5a6f);
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.recording-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.recording-button.recording {
    background: linear-gradient(45deg, #FF4757, #ff3742);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 25px rgba(255, 107, 107, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
}

.stop-button {
    background: linear-gradient(45deg, #6c757d, #5a6268);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin-left: 15px;
}

.stop-button:hover {
    background: linear-gradient(45deg, #5a6268, #495057);
    transform: scale(1.05);
}

/* Recording Status */
.recording-status {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.status-indicator.recording {
    background: #FF4757;
    animation: blink 1s infinite;
}

.status-indicator.ready {
    background: #4CAF50;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Analysis Results */
.analysis-results {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.emotion-analysis, .communication-analysis {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.emotion-analysis h6, .communication-analysis h6 {
    color: #495057;
    margin-bottom: 10px;
}

/* Immediate Feedback */
#immediateFeedback {
    margin-top: 15px;
}

#immediateFeedback .alert {
    border-radius: 8px;
    border: none;
    padding: 10px 15px;
    margin-bottom: 8px;
}

#immediateFeedback .alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    border-left: 4px solid #2196f3;
}

/* Voice Info Panel */
.voice-info-panel {
    background: rgba(0, 123, 255, 0.1);
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 10px;
    border-left: 3px solid #007bff;
}

.voice-info-panel small {
    font-size: 0.85rem;
}

/* Session Summary */
.session-summary-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.session-summary-panel h6 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.session-summary-panel p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.session-summary-panel ul {
    margin-top: 10px;
    padding-left: 20px;
}

.session-summary-panel li {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* Enhanced Voice Features Toggle */
.enhanced-features-toggle {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.feature-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.feature-toggle:last-child {
    margin-bottom: 0;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 25px;
    background: #ccc;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch.active {
    background: #007bff;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch.active::after {
    transform: translateX(25px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .performance-dashboard {
        padding: 15px;
    }
    
    .metric-card {
        margin-bottom: 10px;
    }
    
    .score-display {
        font-size: 1.5rem;
    }
    
    .recording-button {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .stop-button {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .enhanced-recording-controls {
        padding: 15px;
    }
}

/* Enhanced Voice Training Layout */
.enhanced-voice-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 992px) {
    .enhanced-voice-container {
        grid-template-columns: 1fr;
    }
}

/* Error Messages */
#errorMessage .alert {
    border-radius: 8px;
    border: none;
    padding: 12px 16px;
}

#errorMessage .alert-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border-left: 4px solid #f44336;
}

/* Animation for metric updates */
.metric-update {
    animation: metricUpdate 0.5s ease;
}

@keyframes metricUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Loading states */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pro Plan Badge */
.pro-feature-badge {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    margin-left: 8px;
    text-transform: uppercase;
}