/* Reports Styling - Prosper.app */

/* Reports Page Layout */
#reports-page .reports-container {
    max-width: 80vw !important;
    width: 80vw !important;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

#reports-page .other-reports-section {
    width: 100% !important;
    max-width: 100% !important;
}

#reports-page .reports-grid {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

#reports-page .report-block {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    flex: none !important;
    display: flex !important;
    align-items: center !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-secondary) !important;
    border-radius: 12px !important;
    padding: 1rem 1.5rem !important;
    margin-bottom: 1rem !important;
    box-shadow: var(--shadow-card) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

#reports-page .report-block:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--accent-primary) !important;
}

#reports-page .report-block-icon {
    width: 50px !important;
    height: 50px !important;
    background: var(--accent-primary) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 1rem !important;
    flex-shrink: 0 !important;
}

#reports-page .report-block-icon i {
    font-size: 1.2rem !important;
    color: white !important;
}

#reports-page .report-block-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
}

#reports-page .report-block-content h3 {
    color: var(--text-secondary) !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

#reports-page .report-block-content p {
    color: var(--text-muted) !important;
    font-size: 1rem !important;
    margin: 0 !important;
}

#reports-page .report-block-meta {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-top: 0.25rem !important;
}

#reports-page .report-type {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: white !important;
    background: var(--accent-primary) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
}

#reports-page .report-language {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    background: var(--bg-secondary) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
}

#reports-page .report-date {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
    font-weight: 500 !important;
    margin-bottom: 0 !important;
}

/* Report Viewer Page Layout */
#report-page {
    width: 100%;
    padding: 0;
    background: #f4f6f9;
}

#report-page .report-container {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 2.5rem;
}

#report-page .report-header {
    padding: 1.5rem 0 1rem;
}

#report-page #report-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

/* Report Tabs */
.report-tabs {
    background: var(--bg-card);
    border-bottom: 2px solid var(--border-secondary);
    margin-bottom: 0;
    margin-top: 1rem;
    border-radius: 0;
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1.2rem 1.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    border-radius: 0;
}

.tab-btn:hover {
    color: #495057;
    background: #f8f9fa;
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
    font-weight: 700;
}

.tab-btn i {
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

/* Icon colors for different tabs */
.tab-btn[data-section-index="0"] i {
    color: #e74c3c; /* Red for Personal Development */
}

.tab-btn[data-section-index="1"] i {
    color: #3498db; /* Blue for Career */
}

.tab-btn[data-section-index="2"] i {
    color: #e91e63; /* Pink for Love & Relationships */
}

.tab-btn[data-section-index="3"] i {
    color: #27ae60; /* Green for Health & Wellness */
}

.tab-btn[data-section-index="4"] i {
    color: #f39c12; /* Orange for Social Skills */
}

.tab-btn:hover i,
.tab-btn.active i {
    transform: scale(1.1);
}

/* Tab Content */
.tab-content {
    background: var(--bg-card);
    min-height: 400px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

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

/* Section Analysis (top summary block inside each tab) */
.section-analysis {
    background: var(--bg-main);
    border: 1px solid var(--border-secondary);
    border-left: 3px solid var(--accent-primary);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 0;
}

.section-analysis p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Section Loading State */
.section-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #6c757d;
}

.section-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.section-loading p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

/* Section Content within Tabs */
.tab-pane .section-content {
    max-height: none;
    padding: 0;
    overflow: visible;
}

.tab-pane .subsection {
    margin-bottom: 1.5rem;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid var(--border-secondary);
}

.tab-pane .subsection-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    padding: 1.1rem 1.25rem;
    background: var(--bg-card);
    border-radius: 0;
    border: none;
}

.tab-pane .subsection.content-only .subsection-title {
    cursor: default;
}

.tab-pane .subsection-title.clickable {
    cursor: pointer;
    justify-content: space-between;
}

.tab-pane .subsection-title.clickable:hover {
    background: var(--bg-main);
}

.subsection-toggle {
    font-size: 1rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.tab-pane .subsection-content {
    padding: 0;
    margin: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tab-pane .subsection-content.collapsed {
    max-height: 0;
    padding: 0 1rem;
}

.tab-pane .subsection-content.expanded {
    max-height: none;
    padding: 1.25rem 1.5rem;
    background: var(--bg-main);
    border-radius: 0;
    border-top: 1px solid var(--border-secondary);
    border-left: 3px solid var(--accent-primary);
}

.tab-pane .subsection-number {
    background: var(--accent-primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.tab-pane .subsection-content p {
    margin: 0 0 1rem 0;
    color: #444;
    line-height: 1.75;
    font-size: 1.05rem;
}

.tab-pane .subsection-content p:last-child {
    margin-bottom: 0;
}

/* Locked premium upsell (free-tier preview) */
.tab-pane .subsection.subsection-locked {
    opacity: 0.5;
    border: 1px dashed var(--border-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 0;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.tab-pane .subsection-locked .subsection-title {
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-pane .subsection-locked .lock-icon {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.tab-pane .locked-overlay {
    padding: 0.75rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px dashed var(--border-secondary);
}

.tab-pane .locked-overlay .fa-lock {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.tab-pane .btn-upgrade-link {
    background: none;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    transition: background 0.2s, color 0.2s;
}

.tab-pane .btn-upgrade-link:hover {
    background: var(--accent-primary);
    color: var(--text-primary);
}

.tab-pane .strength-item.strength-locked,
.tab-pane .weakness-item.weakness-locked {
    opacity: 0.65;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-secondary);
    border-radius: 6px;
    margin-top: 0.5rem;
    cursor: default;
    background: linear-gradient(145deg, var(--bg-hover), var(--bg-card));
    box-shadow: inset 0 0 0 1px rgba(208, 173, 132, 0.12);
}

.tab-pane .strength-item.strength-locked .fa-gem,
.tab-pane .weakness-item.weakness-locked .fa-gem {
    font-size: 0.75rem;
    color: var(--accent-primary);
}

/* Strengths and Weaknesses */
.strengths-weaknesses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.strengths-section,
.weaknesses-section {
    background: white;
    padding: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.strengths-section:hover,
.weaknesses-section:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.strengths-section h4,
.weaknesses-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.strengths-section h4 {
    color: #28a745;
}

.weaknesses-section h4 {
    color: #dc3545;
}

.strengths-section h4::before {
    content: '✓';
    background: #28a745;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

.weaknesses-section h4::before {
    content: '⚠';
    background: #dc3545;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Strength and Weakness Items */
.strength-item,
.weakness-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.strength-item:hover,
.weakness-item:hover {
    background: #f1f3f4;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    transform: none;
}

.strength-item {
    border-left-color: #28a745;
}

.weakness-item {
    border-left-color: #dc3545;
}

.strength-item:last-child,
.weakness-item:last-child {
    margin-bottom: 0;
}

.strength-item::before {
    content: '✓';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    background: #28a745;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.weakness-item::before {
    content: '⚠';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    background: #dc3545;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.strength-item h5,
.weakness-item h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.strength-item p,
.weakness-item p {
    margin: 0 0 0.5rem 0;
    color: #666;
    line-height: 1.5;
}

.suggestion {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #856404;
}

.suggestion strong {
    color: #6c5ce7;
}

/* Responsive Tabs */
@media (max-width: 768px) {
    /* Reports page mobile adjustments */
    #reports-page .reports-container {
        width: 90vw !important;
        max-width: 90vw !important;
        padding: 0.5rem !important;
        margin: 0 auto;
    }
    
    #reports-page .reports-grid {
        gap: 0.5rem !important;
    }
    
    #reports-page .report-block {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Report container mobile adjustments */
    #report-page .report-container {
        width: 98vw !important;
        max-width: 98vw !important;
        padding: 0;
        margin: 0;
    }
    
    .tab-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0 10px;
        justify-content: center;
    }
    
    .tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        border-bottom: 2px solid transparent;
        border-radius: 6px;
        margin: 0.2rem;
        flex: 0 0 auto;
        min-width: 0;
    }
    
    .tab-btn i {
        font-size: 0.9rem;
    }
    
    .tab-btn.active {
        border-bottom-color: var(--accent-primary);
        background: #f8f9fa;
    }
    
    .tab-content {
        padding: 2px;
    }
    
    .strengths-weaknesses {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .tab-nav {
        padding: 0 5px;
    }
    
    .tab-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
        margin: 0.1rem;
    }
    
    .tab-btn i {
        font-size: 0.8rem;
    }
    
    .tab-btn {
        flex-direction: column;
        gap: 0.2rem;
        padding: 0.4rem 0.5rem;
    }
}

/* Theme compatibility overrides */
#report-page {
    background: var(--bg-main);
}

#report-page #report-title,
.tab-pane .subsection-title,
.strength-item h5,
.weakness-item h5 {
    color: var(--text-secondary);
}

.report-tabs,
.tab-content,
.strengths-section,
.weaknesses-section {
    background: var(--bg-card);
    border-color: var(--border-secondary);
}

.tab-pane .subsection-content.expanded,
.strength-item,
.weakness-item {
    background: var(--bg-main);
    border-color: var(--border-secondary);
}
