/* ADD to Content/css/v2/sections/pricing-calculator.css (don't have the
   current file in this session to append directly).

   Print Quote: window.print() fires on #printQuoteBtn click (see
   pricing-calculator.js). This @media print block hides everything on
   the page except #estimatePanel, and within that panel hides anything
   that only makes sense on-screen (buttons, links, the "switch to
   annual" CTA) while showing a print-only header instead.

   .print-quote-header is hidden by default (display:none, see the
   non-print rule below) since it should never appear on-screen. */

.print-quote-header {
    display: none;
}

/* FIXED: the original visibility:hidden approach caused a real bug -
   visibility:hidden removes elements visually but NOT from layout, so
   the entire rest of the page (nav, plan cards, comparison table, FAQ,
   footer - all still full height, just invisible) was still being
   paginated, producing ~15 mostly-blank pages instead of one.

   Fix: display:none on the actual sibling sections along the real
   ancestor chain up to #estimatePanel, which removes them from layout
   entirely. This assumes <main class="main-content"> wraps page
   content (the convention used elsewhere in this project) - verify
   against the real Pricing.cshtml/​_Layout.cshtml structure and adjust
   the selectors below if it differs. */

@media print {
    /* Hide site chrome outside <main> (announcement bar, navbar, footer, modals). */
    body > *:not(main) {
        display: none !important;
    }

    /* Within <main>, hide every section except the pricing calculator. */
    main > *:not(.pricing-calc-section) {
        display: none !important;
    }

    /* Within the calculator section, hide the header/billing-toggle
       and the left column (plan cards, user count, add-ons) - keep
       only the ancestor chain down to the estimate panel. */
    .pricing-calc-section > .container > *:not(.pricing-calc-grid) {
        display: none !important;
    }

    .pricing-calc-grid > *:not(.estimate-panel) {
        display: none !important;
    }

    #estimatePanel {
        width: 100%;
        margin: 0;
        padding: 24px;
        box-shadow: none;
        border: none;
        border-radius: 0;
    }

    /* Remove sticky positioning / scroll clipping - print needs the
       full content flowing naturally, not clipped to a viewport. */
    .estimate-addons-scroll {
        max-height: none !important;
        overflow: visible !important;
    }

    /* Nothing interactive belongs on a printed quote. */
    #printQuoteBtn,
    .estimate-panel .btn-ce-primary,
    #switchToAnnualLink,
    .trust-row {
        display: none !important;
    }

    /* The savings callout's own "Switch to annual" link specifically -
       keep the $ saved text, just drop the interactive link inline. */
    #annualSavingsCallout {
        border: 1px solid #ccc;
        background: none;
        color: #000;
    }

    .print-quote-header {
        display: block;
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 2px solid #000;
    }

    .print-quote-logo {
        font-size: 1.4rem;
        font-weight: 800;
    }

    .print-quote-meta {
        font-size: 0.9rem;
        color: #444;
        margin-top: 4px;
    }

    /* Force light backgrounds / dark text throughout the panel -
       .estimate-panel likely has some dark/colored backgrounds on
       screen that would waste ink or print illegibly. */
    #estimatePanel,
    #estimatePanel * {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
    }

    @page {
        margin: 1.5cm;
    }
}
