/**
 * Neurodivergent Assessment Styling
 * 
 * Styles for neurodivergent assessment displays across the platform
 */

/* ===== BADGES ===== */
.autism-friendly-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
    transition: all 0.2s ease;
}

.autism-friendly-badge.verified {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.autism-friendly-badge .verified-icon {
    font-size: 1rem;
    margin-left: 0.125rem;
}

.autism-friendly-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

.autism-friendly-badge.verified:hover {
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.4);
}

/* ===== COMPACT VIEW (Browse Results) ===== */
.neurodivergent-compact {
    margin-top: 0.5rem;
}

/* ===== SUMMARY CARD (Channel Pages) ===== */
.neurodivergent-summary-card {
    background: #f8f9fa;
    border: 2px solid #4CAF50;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.neurodivergent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.neurodivergent-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.neurodivergent-verification {
    color: #666;
    margin-bottom: 0.75rem;
}

.neurodivergent-age-range {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    border-left: 4px solid #4CAF50;
}

.neurodivergent-age-range strong {
    color: #2c3e50;
}

.neurodivergent-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.neurodivergent-info .info-text {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

/* ===== RATING BARS ===== */
.neurodivergent-ratings {
    margin: 1rem 0;
}

.neurodivergent-rating-bar {
    margin-bottom: 0.75rem;
}

.rating-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
}

.rating-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.875rem;
}

.rating-value {
    font-weight: 700;
    color: #4CAF50;
    font-size: 0.875rem;
}

.rating-bar-container {
    height: 0.75rem;
    background: #e0e0e0;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rating-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 0.375rem;
}

.rating-bar-fill.rating-good {
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 100%);
}

.rating-bar-fill.rating-moderate {
    background: linear-gradient(90deg, #FFC107 0%, #FFD54F 100%);
}

.rating-bar-fill.rating-concerning {
    background: linear-gradient(90deg, #F44336 0%, #EF5350 100%);
}

/* ===== EDUCATIONAL SUBJECTS ===== */
.educational-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.educational-subjects-section {
    margin-top: 1rem;
}

.educational-subjects-section h4 {
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    font-size: 1rem;
}

.subject-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #E3F2FD;
    color: #1976D2;
    border-radius: 0.375rem;
    font-size: 0.813rem;
    font-weight: 500;
    border: 1px solid #BBDEFB;
    transition: all 0.2s ease;
}

.subject-tag:hover {
    background: #BBDEFB;
    transform: translateY(-1px);
}

/* ===== DETAILED CARD (Video Pages) ===== */
.neurodivergent-detailed-card {
    background: #f8f9fa;
    border: 2px solid #4CAF50;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.neurodivergent-detailed-card[open] {
    background: white;
}

.neurodivergent-detailed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.neurodivergent-detailed-header:hover {
    background: #f0f0f0;
}

.neurodivergent-detailed-header.autism-friendly {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
}

.neurodivergent-detailed-header.autism-friendly:hover {
    background: linear-gradient(135deg, #C8E6C9 0%, #A5D6A7 100%);
}

.neurodivergent-detailed-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.neurodivergent-detailed-content {
    padding: 1.25rem;
    border-top: 1px solid #ddd;
}

/* ===== VERIFICATION STATUS ===== */
.verification-status {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 0.375rem;
    border-left: 4px solid #FFC107;
}

.verification-status.verified {
    border-left-color: #4CAF50;
}

.verification-text {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.verification-progress-bar {
    height: 0.5rem;
    background: #e0e0e0;
    border-radius: 0.25rem;
    overflow: hidden;
}

.verification-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFC107 0%, #FFD54F 100%);
    transition: width 0.3s ease;
}

.verification-status.verified .verification-progress-fill {
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 100%);
}

/* ===== AGE BRACKET BREAKDOWN ===== */
.age-bracket-breakdown {
    margin-top: 1.5rem;
}

.age-bracket-breakdown h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.125rem;
}

.age-bracket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.age-bracket-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
}

.age-bracket-card.appropriate {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #ffffff 0%, #f1f8f4 100%);
}

.age-bracket-card.not-appropriate {
    border-color: #F44336;
    background: linear-gradient(135deg, #ffffff 0%, #ffebee 100%);
    opacity: 0.7;
}

.age-bracket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.age-bracket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

.age-bracket-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1rem;
}

.appropriate-status {
    font-size: 0.813rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.age-bracket-card.appropriate .appropriate-status {
    background: #E8F5E9;
    color: #2E7D32;
}

.age-bracket-card.not-appropriate .appropriate-status {
    background: #FFEBEE;
    color: #C62828;
}

.age-bracket-ratings {
    margin-bottom: 1rem;
}

.age-bracket-reasoning {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 0.375rem;
    border-left: 3px solid #2196F3;
}

.age-bracket-reasoning p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

/* ===== AI REASONING & GROUNDING ===== */
.ai-reasoning-section,
.grounding-evidence-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.375rem;
    border-left: 4px solid #2196F3;
}

.ai-reasoning-section h4,
.grounding-evidence-section h4 {
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    font-size: 1rem;
}

.ai-reasoning p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

.grounding-evidence {
    margin: 0;
    padding-left: 1.5rem;
}

.grounding-evidence li {
    margin-bottom: 0.5rem;
    color: #555;
    line-height: 1.5;
}

/* ===== VOTING INTERFACE ===== */
.neurodivergent-voting,
.neurodivergent-voting-login {
    margin-top: 1rem;
    padding: 1rem;
    background: #FFF9C4;
    border-radius: 0.375rem;
    border: 1px solid #FFF176;
}

.voting-question {
    margin-bottom: 0.75rem;
}

.voting-question p {
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
}

.voting-buttons {
    display: flex;
    gap: 0.75rem;
}

.vote-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vote-agree {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.vote-agree:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
}

.vote-disagree {
    background: linear-gradient(135deg, #F44336 0%, #E53935 100%);
    color: white;
}

.vote-disagree:hover {
    background: linear-gradient(135deg, #E53935 0%, #D32F2F 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.4);
}

.vote-btn:active {
    transform: translateY(0);
}

.vote-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.voting-result {
    margin-top: 0.75rem;
}

.vote-success {
    margin: 0;
    color: #2E7D32;
    font-weight: 600;
    text-align: center;
}

.neurodivergent-voting-login p {
    margin: 0;
    text-align: center;
}

.neurodivergent-voting-login a {
    color: #1976D2;
    font-weight: 600;
    text-decoration: none;
}

.neurodivergent-voting-login a:hover {
    text-decoration: underline;
}

/* ===== DISCLAIMER ===== */
.neurodivergent-disclaimer {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #FFF3E0;
    border-radius: 0.375rem;
    border-left: 4px solid #FF9800;
}

.neurodivergent-disclaimer p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

.neurodivergent-disclaimer strong {
    color: #E65100;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .neurodivergent-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .age-bracket-grid {
        grid-template-columns: 1fr;
    }
    
    .voting-buttons {
        flex-direction: column;
    }
    
    .vote-btn {
        width: 100%;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .autism-friendly-badge,
    .rating-bar-fill,
    .age-bracket-card,
    .vote-btn {
        transition: none;
    }
}

/* Focus states for keyboard navigation */
.vote-btn:focus,
.neurodivergent-detailed-header:focus {
    outline: 2px solid #2196F3;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .neurodivergent-summary-card,
    .neurodivergent-detailed-card {
        border-width: 3px;
    }
    
    .autism-friendly-badge {
        border: 2px solid white;
    }
}

/* ===== ANIMATION ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.neurodivergent-detailed-content {
    animation: slideIn 0.3s ease;
}

/* ===== PRINT STYLES ===== */
@media print {
    .voting-buttons,
    .neurodivergent-voting-login {
        display: none;
    }
    
    .neurodivergent-detailed-card {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .autism-friendly-badge {
        background: none;
        color: #000;
        border: 1px solid #000;
    }
}
