/* ============================================
   GENZFLOW — REPORTS EXPORT
   Print-optimized CSS for analytics report
   ============================================ */

/* Report wrapper (hidden on screen, shown on print) */
.report-wrapper {
    display: none;
}

/* Print styles */
@media print {

    /* Hide everything except the report */
    body>* {
        display: none !important;
    }

    body>.report-wrapper {
        display: block !important;
    }

    body {
        background: #fff !important;
        color: #222 !important;
        font-family: 'Inter', -apple-system, sans-serif;
        margin: 0;
        padding: 0;
    }

    .report-wrapper {
        width: 100%;
        max-width: 210mm;
        margin: 0 auto;
        padding: 20mm 15mm;
    }

    /* Cover */
    .report-cover {
        text-align: center;
        padding: 40px 0 30px;
        border-bottom: 2px solid #e0e0e0;
        margin-bottom: 30px;
    }

    .report-logo {
        font-size: 28px;
        font-weight: 700;
        color: #6e56cf;
        margin-bottom: 8px;
    }

    .report-cover h1 {
        font-size: 22px;
        font-weight: 600;
        color: #222;
        margin-bottom: 6px;
    }

    .report-cover .report-date {
        font-size: 13px;
        color: #888;
    }

    .report-cover .report-user {
        font-size: 14px;
        color: #555;
        margin-top: 4px;
    }

    /* Sections */
    .report-section {
        margin-bottom: 28px;
        page-break-inside: avoid;
    }

    .report-section h2 {
        font-size: 16px;
        font-weight: 600;
        color: #6e56cf;
        margin-bottom: 12px;
        padding-bottom: 6px;
        border-bottom: 1px solid #e0e0e0;
    }

    /* Metric cards grid */
    .report-metrics {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        margin-bottom: 24px;
    }

    .report-metric {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 12px;
        text-align: center;
    }

    .report-metric .rm-label {
        font-size: 11px;
        color: #888;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 4px;
    }

    .report-metric .rm-value {
        font-size: 20px;
        font-weight: 700;
        color: #222;
    }

    .report-metric .rm-change {
        font-size: 11px;
        color: #888;
        margin-top: 2px;
    }

    /* Chart image */
    .report-chart-img {
        width: 100%;
        max-height: 300px;
        object-fit: contain;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
    }

    /* Insights list */
    .report-insights {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .report-insights li {
        padding: 8px 12px;
        border-left: 3px solid #6e56cf;
        margin-bottom: 8px;
        font-size: 13px;
        color: #444;
        background: #f9f9fb;
        border-radius: 0 6px 6px 0;
    }

    /* Best post card */
    .report-best-post {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 16px;
    }

    .report-best-post .rbp-caption {
        font-size: 14px;
        color: #222;
        margin-bottom: 8px;
    }

    .report-best-post .rbp-stats {
        display: flex;
        gap: 16px;
        font-size: 12px;
        color: #888;
    }

    /* Best hours */
    .report-hours {
        display: flex;
        gap: 12px;
    }

    .report-hour {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 10px 16px;
        text-align: center;
        flex: 1;
    }

    .report-hour .rh-time {
        font-size: 18px;
        font-weight: 700;
        color: #222;
    }

    .report-hour .rh-score {
        font-size: 11px;
        color: #888;
    }

    /* Footer */
    .report-footer {
        margin-top: 40px;
        padding-top: 16px;
        border-top: 1px solid #e0e0e0;
        text-align: center;
        font-size: 11px;
        color: #aaa;
    }
}

/* On-screen report button */
.report-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #8a8a9a);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.report-export-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #f0f0f5);
}