/**
 * EMTRACE ML ANALYSIS STYLES
 * ==========================
 * Styles for voice emotion analysis results display.
 */

/* Analysis Results Container */
.analysis-results {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 16px 0;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.analysis-results.fallback-mode {
    border-color: rgba(245, 158, 11, 0.5);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.results-header h4 {
    margin: 0;
    color: #fff;
    font-size: 1.3rem;
}

.fallback-badge {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Emotion Grid */
.emotion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.emotion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.emotion-name {
    min-width: 80px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.emotion-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.emotion-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.emotion-value {
    min-width: 40px;
    text-align: right;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Stress Indicator */
.stress-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 16px;
}

.stress-indicator > span:first-child {
    color: #94a3b8;
    min-width: 100px;
}

.stress-indicator > span:last-child {
    color: #fff;
    font-weight: 700;
    min-width: 50px;
    text-align: right;
}

.stress-bar {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.stress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease-out;
}

.stress-bar.low .stress-fill {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.stress-bar.moderate .stress-fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.stress-bar.high .stress-fill {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Resonance Score */
.resonance-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    margin-bottom: 20px;
}

.resonance-score span {
    color: #94a3b8;
    font-size: 1rem;
}

.resonance-score strong {
    font-size: 2rem;
    font-weight: 800;
}

.resonance-score strong.positive {
    color: #10b981;
}

.resonance-score strong.negative {
    color: #ef4444;
}

/* Emotional Blocks */
.emotional-blocks {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.emotional-blocks h5 {
    color: #f59e0b;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.block-item {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.block-item strong {
    color: #fbbf24;
    display: block;
    margin-bottom: 8px;
}

.block-item p {
    color: #e2e8f0;
    margin: 0 0 8px 0;
    font-size: 0.95rem;
}

.block-item em {
    color: #10b981;
    font-style: normal;
    font-size: 0.9rem;
}

.block-item.hesitation {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.1);
}

.block-item.suppression {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}

.block-item.tension {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.1);
}

/* Insights */
.insights {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.insights h5 {
    color: #8b5cf6;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.insights ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.insights li {
    color: #e2e8f0;
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.insights li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #8b5cf6;
}

/* Predictions */
.predictions {
    margin-top: 20px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
}

.predictions h5 {
    color: #10b981;
    margin: 0 0 8px 0;
}

.predictions p {
    margin: 0;
    color: #e2e8f0;
}

.predictions strong {
    color: #34d399;
}

/* Professional Matches */
.professional-matches {
    margin-top: 24px;
}

.professional-matches h5 {
    color: #6366f1;
    margin-bottom: 16px;
}

.match-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.match-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.match-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.match-info {
    flex: 1;
}

.match-info h6 {
    color: #fff;
    margin: 0 0 4px 0;
    font-size: 1rem;
}

.match-info .title {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.match-score {
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-score-bar {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.match-score-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 3px;
}

.match-score-value {
    color: #10b981;
    font-weight: 700;
    font-size: 0.9rem;
}

.match-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.match-reason {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.session-estimate {
    text-align: right;
    min-width: 120px;
}

.session-estimate .sessions {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.session-estimate .label {
    color: #94a3b8;
    font-size: 0.75rem;
}

.session-estimate .note {
    color: #6366f1;
    font-size: 0.7rem;
    margin-top: 4px;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.analysis-results {
    animation: fadeInUp 0.5s ease-out;
}

.emotion-item {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.emotion-item:nth-child(1) { animation-delay: 0.1s; }
.emotion-item:nth-child(2) { animation-delay: 0.15s; }
.emotion-item:nth-child(3) { animation-delay: 0.2s; }
.emotion-item:nth-child(4) { animation-delay: 0.25s; }
.emotion-item:nth-child(5) { animation-delay: 0.3s; }
.emotion-item:nth-child(6) { animation-delay: 0.35s; }

/* Responsive */
@media (max-width: 768px) {
    .emotion-grid {
        grid-template-columns: 1fr;
    }
    
    .match-card {
        flex-direction: column;
        text-align: center;
    }
    
    .match-avatar {
        margin: 0 auto;
    }
    
    .session-estimate {
        text-align: center;
        margin-top: 12px;
    }
}

