/* Print Styles for Academy Pages - A4 Format */

/* Hide elements that shouldn't be printed */
@media print {
    /* Hide navigation and sidebar */
    .col-md-2,
    .navbar,
    .btn,
    .card-header .btn,
    .print-button,
    .no-print {
        display: none !important;
    }
    
    /* Adjust main content layout */
    .col-md-10 {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Page setup for A4 */
    @page {
        size: A4;
        margin: 2cm 1.5cm;
    }
    
    /* Body and container adjustments */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: white !important;
    }
    
    .container-fluid,
    .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Card styling for print */
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        margin-bottom: 15pt !important;
        page-break-inside: avoid;
    }
    
    .card-header {
        background: #f8f9fa !important;
        border-bottom: 1px solid #000 !important;
        padding: 8pt !important;
    }
    
    .card-body {
        padding: 10pt !important;
    }
    
    /* Typography adjustments */
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
        margin-top: 12pt !important;
        margin-bottom: 6pt !important;
    }
    
    h1 { font-size: 18pt !important; }
    h2 { font-size: 16pt !important; }
    h3 { font-size: 14pt !important; }
    h4 { font-size: 13pt !important; }
    h5 { font-size: 12pt !important; }
    h6 { font-size: 11pt !important; }
    
    p {
        margin-bottom: 6pt !important;
        orphans: 3;
        widows: 3;
    }
    
    /* Table styling */
    table {
        border-collapse: collapse !important;
        width: 100% !important;
        margin-bottom: 10pt !important;
        page-break-inside: avoid;
    }
    
    th, td {
        border: 1px solid #000 !important;
        padding: 4pt !important;
        text-align: left !important;
    }
    
    th {
        background: #f8f9fa !important;
        font-weight: bold !important;
    }
    
    /* List styling */
    ul, ol {
        margin-bottom: 8pt !important;
    }
    
    li {
        margin-bottom: 2pt !important;
    }
    
    /* Image adjustments */
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
    
    /* Chart containers - hide or show appropriately */
    .chart-container {
        page-break-inside: avoid;
    }
    
    /* Valuation scale styling */
    .valuation-scale {
        page-break-inside: avoid;
    }
    
    .scale-bar {
        border: 1px solid #000 !important;
    }
    
    /* Economic indicators grid */
    .economic-indicators-grid {
        page-break-inside: avoid;
    }
    
    .indicator-card {
        border: 1px solid #000 !important;
        margin-bottom: 8pt !important;
        page-break-inside: avoid;
    }
    
    /* Hide interactive elements */
    .btn,
    .form-control,
    .dropdown,
    .modal,
    .tooltip {
        display: none !important;
    }
    
    /* Ensure proper spacing */
    .row {
        margin: 0 !important;
    }
    
    .col-md-12,
    .col-md-6,
    .col-md-4,
    .col-md-3 {
        width: 100% !important;
        float: none !important;
        margin-bottom: 10pt !important;
    }
    
    /* Page breaks */
    .page-break-before {
        page-break-before: always !important;
    }
    
    .page-break-after {
        page-break-after: always !important;
    }
    
    .page-break-inside-avoid {
        page-break-inside: avoid !important;
    }
    
    /* Footer for print */
    .print-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 10pt;
        color: #666;
        border-top: 1px solid #ccc;
        padding: 5pt;
    }
    
    /* Ensure content doesn't overlap with footer */
    body {
        padding-bottom: 30pt !important;
    }
}

/* Print button styling for screen */
.print-button {
    position: absolute !important;
    right: 1.5rem !important; /* Match content padding */
    z-index: 1000 !important;
    margin: 0 !important;
    display: inline-block !important;
}

/* Ensure content containers have relative positioning */
.card,
.academy-article {
    position: relative !important;
}

/* Hide print button when printing */
@media print {
    .print-button {
        display: none !important;
    }
}
