/* Reports View Styles */

.reports-container {
    width: 100%;
    padding: 20px 0;
}

.reports-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: flex-end;
}

.reports-search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.reports-search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.reports-search-input:focus {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}

.reports-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Filter Controls */
.report-filter-group {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 6px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.filter-btn.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.reports-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.report-card {
    background: rgba(15, 23, 42, 0.6);
    /* Transparent dark base */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    /* Increased from 12px/lg */
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: row;
    /* Horizontal Layout */
    min-height: 260px;
    /* Slightly taller for breathing room */
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.report-card:hover {
    transform: translateY(-5px) scale(1.01);
    background: rgba(30, 41, 59, 0.9);
}

/* Interactive Report Glow (Green) */
.report-card.interactive-card:hover {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.4), 0 0 15px rgba(16, 185, 129, 0.2);
}

/* Standard Report Glow (Amber) */
.report-card:not(.interactive-card):hover {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.4), 0 0 15px rgba(245, 158, 11, 0.2);
}

.report-preview {
    width: 45%;
    /* Increased from 320px */
    flex-shrink: 0;
    height: auto;
    /* Full height */
    min-height: 100%;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.report-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

/* --- Layout Grid (Sidebar + Main) --- */
.reports-content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    /* Default to full width (no sidebar) */
    gap: 32px;
    align-items: start;
}

.reports-content-wrapper.with-sidebar {
    grid-template-columns: 280px 1fr;
    /* Sidebar + Main */
}

.reports-sidebar {
    width: 100%;
}

.sidebar-sticky {
    position: sticky;
    top: 24px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.reports-main {
    min-width: 0;
    /* Prevent overflow */
}


/* --- Top Reports Section --- */
.top-reports-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Reduced from 16px */
}

.top-reports-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-reports-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-pulse {
    animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
        filter: drop-shadow(0 0 4px #f59e0b);
    }

    100% {
        opacity: 0.6;
    }
}

/* Compact Top Report Card */
.top-report-card {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px 8px;
    /* Reduced padding */
    display: flex;
    align-items: flex-start;
    /* Align to top for wrapped text */
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.top-report-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}



.top-report-rank {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.15);
    width: 20px;
    text-align: center;
    line-height: 1.4;
    /* Align with title */
    margin-top: 1px;
}

.top-report-info {
    flex: 1;
    min-width: 0;
}

.top-report-title {
    font-size: 0.85rem;
    /* Slightly smaller */
    font-weight: 500;
    color: #e2e8f0;
    margin-bottom: 2px;
    line-height: 1.3;
}

.top-report-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-report-views {
    color: #60a5fa;
    display: flex;
    align-items: center;
    gap: 4px;
}

.report-card:hover .report-preview img {
    transform: scale(1.05);
}

.report-content {
    padding: 30px;
    /* Increased from 24px */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.report-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.report-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.report-description {
    font-size: 0.95rem;
    color: #94a3b8;
    /* Lighter slate */
    line-height: 1.7;
    /* Increased line-height */
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
}

.report-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    /* Lighter border */
}

.action-btn {
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 8px 20px;
    border-radius: 30px;
    /* Pill shape */
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.interactive-card .action-btn {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.report-card:hover .action-btn {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.interactive-card:hover .action-btn {
    background: #10b981;
    color: white;
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.report-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-tag {
    font-size: 0.7rem;
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.08);
    /* More subtle */
    padding: 6px 14px;
    border-radius: 20px;
    /* Fully rounded pills */
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.read-more {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.read-more svg {
    transition: transform 0.2s;
}

.report-card:hover .read-more svg {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .reports-content-wrapper {
        grid-template-columns: 1fr;
    }

    .reports-sidebar {
        order: 2;
        /* Move popularity below main content on mobile? Or keep top? default is top. Let's keep top. */
        display: none !important;
        /* Actually, maybe hide sidebar on mobile to save space? or Show it? Let's hide it for now as it's secondary */
    }

    .reports-grid {
        max-width: 100%;
    }

    .report-card {
        flex-direction: column;
        /* Stack on mobile */
    }

    .report-preview {
        width: 100%;
        height: 200px;
    }
}


.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- Report Article Layout (News Style) --- */
.report-article-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    color: var(--text-primary);
}

.report-article-header {
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
}

.report-article-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.report-article-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.report-article-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 15px 0;
    color: white;
    letter-spacing: -0.5px;
}

.report-article-meta {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.report-article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e2e8f0;
    font-family: 'Georgia', 'Cambria', serif;
    /* Serif for readability typical in news */
}

/* Floating Image Style */
.report-featured-image {
    float: none;
    width: 100%;
    height: 300px;
    margin-right: 0;
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.report-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.report-featured-image:hover img {
    transform: scale(1.03);
}

/* Inline Images (Markdown Content) */
.report-article-body img:not(.report-featured-image img) {
    max-width: 100%;
    height: auto;
    max-height: 450px;
    display: block;
    margin: 24px auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.image-caption {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 8px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--font-primary);
    /* Revert caption to sans */
    text-align: center;
}

.report-tags-footer .report-tag {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
    font-family: var(--font-primary);
}

/* Mobile Responsiveness for Article */
@media (max-width: 768px) {
    .report-article-title {
        font-size: 1.8rem;
    }

    .report-featured-image {
        float: none;
        width: 100%;
        margin-right: 0;
        margin-bottom: 30px;
    }
}

/* --- Interactive Chart Controls (Global) --- */
.chart-controls-wrapper {
    background: rgba(15, 23, 42, 0.6);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.chart-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-label {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Styled Dropdown / Select */
.chart-controls select {
    background: rgba(30, 41, 59, 1);
    color: white;
    border: 1px solid #475569;
    padding: 8px;
    border-radius: 4px;
    min-width: 160px;
    font-size: 0.9rem;
    cursor: pointer;
}

.chart-controls select:focus {
    outline: none;
    border-color: #60a5fa;
}

/* Custom Multi-Select Dropdown */
.dropdown-check-list {
    position: relative;
    width: 200px;
}

.dropdown-check-list .anchor {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 41, 59, 1);
    color: white;
    border: 1px solid #475569;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.dropdown-check-list .anchor:after {
    content: "";
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #cbd5e1;
    margin-left: 10px;
}

.dropdown-check-list .items {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid #475569;
    border-top: none;
    z-index: 50;
    max-height: 250px;
    overflow-y: auto;
    padding: 5px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.dropdown-check-list.visible .items {
    display: block;
}

.dropdown-check-list .items div {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-check-list .items div:last-child {
    border-bottom: none;
}

.dropdown-check-list .items label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}

.dropdown-check-list .items input[type="checkbox"] {
    accent-color: #3b82f6;
    width: 14px;
    height: 14px;
}

.slider-val {
    color: #3b82f6;
    font-weight: bold;
    font-size: 0.9rem;
}
/* Share Button */
.share-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px; /* Spacing from main action button */
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-notification svg {
    color: #10b981; /* Success green */
}
