/*
 * Holland Strategic Wealth Advisors - Print Styles
 * Professional HSWA-branded print/PDF output
 */

@media print {
    /* ===== RESET FOR PRINT ===== */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    html,
    body {
        font-family: 'Open Sans', Arial, sans-serif !important;
        background: #ffffff !important;
        color: #333333 !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 11pt !important;
        line-height: 1.5 !important;
    }

    /* ===== HIDE NON-PRINT ELEMENTS ===== */
    .site-header,
    .main-nav,
    .skip-link,
    .back-link,
    .calculate-btn,
    .print-btn,
    .btn-primary,
    .btn-secondary,
    .button-group,
    .search-box,
    .category-tabs,
    .tree-nav,
    .monte-carlo-section,
    .no-print,
    input[type="range"],
    button[type="reset"],
    .footer-links {
        display: none !important;
    }

    /* ===== CONTAINER ===== */
    .container {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0.5in !important;
    }

    /* ===== PRINT HEADER (HSWA BRANDING) ===== */
    .print-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
        border-bottom: 3px solid #2ea3f2;
    }

    .print-header-brand {
        display: flex !important;
        align-items: center;
        gap: 0.75rem;
    }

    .print-header-logo {
        width: 50px;
        height: 50px;
    }

    .print-header-text {
        display: flex;
        flex-direction: column;
    }

    .print-header-company {
        font-size: 14pt;
        font-weight: 700;
        color: #1e3a5f;
        margin: 0;
    }

    .print-header-tagline {
        font-size: 9pt;
        color: #666666;
        margin: 0;
    }

    .print-header-date {
        text-align: right;
        color: #666666;
        font-size: 9pt;
    }

    /* Create header for pages that don't have it */
    body::before {
        content: "";
        display: block;
    }

    /* ===== PAGE HEADER ===== */
    .page-header {
        margin-bottom: 1rem !important;
        padding-bottom: 0.5rem !important;
        border-bottom: 1px solid #dddddd !important;
    }

    .page-header h1 {
        font-size: 18pt !important;
        color: #1e3a5f !important;
        margin-bottom: 0.25rem !important;
    }

    .page-header .description,
    .page-header p {
        font-size: 10pt !important;
        color: #666666 !important;
    }

    /* ===== CALCULATOR GRID FOR PRINT ===== */
    .calculator-grid {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    /* ===== INPUT SECTION ===== */
    .input-section {
        position: relative !important;
        top: auto !important;
        background: #f5f5f5 !important;
        padding: 0.75rem !important;
        margin-bottom: 1rem !important;
        border: 1px solid #dddddd !important;
        page-break-inside: avoid !important;
    }

    .input-section h2 {
        font-size: 12pt !important;
        color: #1e3a5f !important;
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.25rem !important;
        border-bottom: 1px solid #dddddd !important;
    }

    .input-columns {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }

    .input-column h3 {
        font-size: 10pt !important;
        color: #333333 !important;
        margin-bottom: 0.5rem !important;
    }

    .form-group {
        margin-bottom: 0.5rem !important;
    }

    .form-group label {
        font-size: 9pt !important;
        color: #666666 !important;
        display: inline-block !important;
        margin-right: 0.25rem !important;
    }

    /* Show input values as text for print */
    input[type="number"],
    input[type="text"],
    select {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        font-size: 10pt !important;
        font-weight: 600 !important;
        color: #333333 !important;
    }

    .input-wrapper {
        display: inline !important;
    }

    .currency,
    .percent {
        position: relative !important;
        color: #333333 !important;
        font-weight: 600 !important;
    }

    /* ===== RESULTS SECTION ===== */
    .results-section {
        background: #ffffff !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    .results-section h2 {
        font-size: 14pt !important;
        color: #1e3a5f !important;
        margin-bottom: 0.75rem !important;
        padding-bottom: 0.25rem !important;
        border-bottom: 2px solid #2ea3f2 !important;
    }

    .results-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
        margin-bottom: 1rem !important;
    }

    .result-card {
        background: #f5f5f5 !important;
        padding: 0.5rem !important;
        border: 1px solid #dddddd !important;
        page-break-inside: avoid !important;
    }

    .result-label {
        font-size: 8pt !important;
        color: #666666 !important;
        margin-bottom: 0.125rem !important;
    }

    .result-value {
        font-size: 12pt !important;
        font-weight: 700 !important;
        color: #333333 !important;
    }

    .result-value.highlight {
        color: #2ea3f2 !important;
    }

    /* ===== CHARTS ===== */
    .chart-container {
        padding: 0.5rem !important;
        margin-bottom: 1rem !important;
        border: 1px solid #dddddd !important;
        page-break-inside: avoid !important;
    }

    .chart-container canvas {
        max-height: 3in !important;
    }

    /* ===== BREAKDOWN SECTION ===== */
    .breakdown-section {
        background: #ffffff !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        margin-bottom: 1rem !important;
    }

    .breakdown-section h2 {
        font-size: 12pt !important;
        color: #1e3a5f !important;
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.25rem !important;
        border-bottom: 1px solid #dddddd !important;
    }

    /* ===== TABLES ===== */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 9pt !important;
    }

    th {
        background: #f5f5f5 !important;
        padding: 0.375rem 0.5rem !important;
        text-align: left !important;
        font-weight: 600 !important;
        color: #1e3a5f !important;
        border: 1px solid #dddddd !important;
    }

    td {
        padding: 0.375rem 0.5rem !important;
        border: 1px solid #dddddd !important;
    }

    tbody tr:nth-child(even) {
        background: #fafafa !important;
    }

    /* ===== INFO BOXES ===== */
    .info-box,
    .warning-box {
        padding: 0.5rem !important;
        margin: 0.5rem 0 !important;
        font-size: 9pt !important;
        page-break-inside: avoid !important;
    }

    /* ===== PRINT FOOTER (HSWA BRANDING) ===== */
    .site-footer {
        display: block !important;
        margin-top: 1rem !important;
        padding-top: 0.5rem !important;
        border-top: 2px solid #2ea3f2 !important;
        background: transparent !important;
    }

    .footer-container {
        width: 100% !important;
        padding: 0 !important;
    }

    .footer-content {
        display: block !important;
    }

    .footer-brand {
        display: block !important;
    }

    .footer-logo {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        margin-bottom: 0.25rem !important;
    }

    .footer-logo svg {
        width: 24px !important;
        height: 24px !important;
    }

    .footer-logo span {
        font-size: 11pt !important;
        font-weight: 700 !important;
        color: #1e3a5f !important;
    }

    .tagline {
        font-size: 9pt !important;
        color: #666666 !important;
        margin-bottom: 0.25rem !important;
    }

    .footer-bottom {
        border-top: none !important;
        padding-top: 0.25rem !important;
    }

    .disclaimer-text {
        font-size: 8pt !important;
        color: #999999 !important;
        text-align: left !important;
        line-height: 1.4 !important;
    }

    .copyright {
        font-size: 8pt !important;
        color: #999999 !important;
    }

    /* Print contact info */
    .print-contact {
        display: block !important;
        margin-top: 0.5rem;
        font-size: 9pt;
        color: #666666;
    }

    /* ===== PAGE BREAKS ===== */
    h1, h2, h3 {
        page-break-after: avoid !important;
    }

    .result-card,
    .breakdown-section,
    .chart-container,
    .analysis-card,
    table {
        page-break-inside: avoid !important;
    }

    /* ===== LINKS ===== */
    a {
        color: #333333 !important;
        text-decoration: none !important;
    }

    /* Don't show URLs for links */
    a[href]::after {
        content: none !important;
    }

    /* ===== SPECIFIC ANALYSIS SECTIONS ===== */
    .analysis-card {
        background: #fafafa !important;
        border-left: 3px solid #dddddd !important;
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .analysis-card.highlight {
        border-left-color: #2ea3f2 !important;
    }

    .analysis-card.success {
        border-left-color: #22c55e !important;
    }

    .analysis-card.warning {
        border-left-color: #f59e0b !important;
    }
}

/* ===== PRINT-ONLY ELEMENTS ===== */

/* Elements only visible in print */
.print-only {
    display: none !important;
}

@media print {
    .print-only {
        display: block !important;
    }
}

/* Print header container (add to pages) */
.print-header-container {
    display: none;
}

@media print {
    .print-header-container {
        display: block !important;
        margin-bottom: 1rem;
    }
}
