/**
 * Print Stylesheet for Boston Partners Website
 * Compatible with WordPress and Elementor
 * Optimized for professional print and PDF export
 */

@media print {
  
  /* ============================================
     RESET & BASE STYLES
     ============================================ */
  
  * {
    background: transparent !important;
    color: #000000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  body {
    font-family: "Roboto", Arial, sans-serif;
    font-size: 12pt;
    line-height: 1.5;
    color: #000000;
    background: #ffffff;
    margin: 0;
    padding: 20pt;
  }
  
  /* ============================================
     HIDE NON-ESSENTIAL UI ELEMENTS
     ============================================ */
  
  /* Navigation & Menus */
  header,
  .elementor-location-header,
  .elementor-location-footer,
  footer,
  nav,
  .kurtosys-menu,
  .kurtosys-menu-container,
  .kurtosys-mobile-menu,
  .kurtosys-mobile-menu-toggle-button,
  .kurtosys-mobile-menu-cover,
  .elementor-widget-nav-menu,
  .elementor-nav-menu,
  .wp-block-navigation,
  .mobile-menu,
  .kurtosys-sub-mega-menu,
  .kurtosys-menu-item-wrapper,
  .kurtosys-dropdown-arrow {
    display: none !important;
  }
  
  /* Cookie Banners & Popups */
  .cookie-banner,
  .cookie-notice,
  .cookie-consent,
  #cookie-notice,
  #cookie-consent,
  .elementor-popup-modal,
  .elementor-popup,
  .dialog-message,
  [data-elementor-type="popup"],
  .elementor-template-popup {
    display: none !important;
  }
  
  /* Interactive Elements */
  button,
  .button,
  .elementor-button,
  .wp-block-button,
  input[type="button"],
  input[type="submit"],
  .kurtosys-engine-arrow,
  .kurtosys-slick-dots,
  .recharts-tooltip-wrapper,
  .recharts-legend-wrapper,
  [role="button"],
  [tabindex],
  .elementor-menu-anchor:before {
    display: none !important;
  }
  
  /* Social Media & Sharing */
  .social-share,
  .share-buttons,
  .social-icons,
  .elementor-social-icons {
    display: none !important;
  }
  
  /* Search & Forms */
  .search-form,
  .search-box,
  form:not(.print-keep),
  .elementor-form,
  .kurtosys-form {
    display: none !important;
  }
  
  /* Loading Spinners & Skeletons */
  [data-ksys-app-template-id] > svg,
  #ksys-skeleton,
  .kurtosys-calendar-loading,
  .is-loading {
    display: none !important;
  }
  
  /* Charts & Interactive Graphics (keep data tables) */
  .recharts-wrapper,
  .recharts-surface,
  svg.recharts-surface,
  .chart-container:not(.print-keep),
  canvas {
    display: none !important;
  }
  
  /* ============================================
     TYPOGRAPHY & HEADINGS
     ============================================ */
  
  h1, h2, h3, h4, h5, h6 {
    font-family: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
    color: #000000;
    page-break-after: avoid;
    margin-top: 1em;
    margin-bottom: 0.5em;
  }
  
  h1 {
    font-size: 24pt;
    font-weight: bold;
    letter-spacing: -0.5pt;
    color: #000000;
  }
  
  h2 {
    font-size: 18pt;
    font-weight: normal;
    color: #004E96;
    letter-spacing: -0.5pt;
  }
  
  h3 {
    font-size: 16pt;
    font-weight: normal;
    color: #000000;
  }
  
  h4 {
    font-size: 14pt;
    font-weight: normal;
    color: #000000;
  }
  
  h5, h6 {
    font-size: 12pt;
    font-weight: normal;
    color: #000000;
  }
  
  p {
    margin: 0.75em 0;
    orphans: 3;
    widows: 3;
    page-break-inside: avoid;
  }
  
  /* ============================================
     LINKS
     ============================================ */
  
  a {
    color: #000000 !important;
    text-decoration: none;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666666;
  }
  
  /* Don't show URLs for internal anchors */
  a[href^="#"]:after,
  a[href^="javascript:"]:after {
    content: "";
  }
  
  /* ============================================
     TABLES - FINANCIAL DATA
     ============================================ */
  
  table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 1em 0;
    page-break-inside: avoid;
    font-size: 10pt;
  }
  
  table thead {
    display: table-header-group;
  }
  
  table tbody {
    display: table-row-group;
  }
  
  table tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
  
  table th,
  table td {
    border: 1px solid #000000;
    padding: 8pt 10pt;
    text-align: left;
    vertical-align: top;
  }
  
  table th {
    background-color: #f5f5f5 !important;
    font-weight: bold;
    font-family: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
    color: #000000;
    border-bottom: 2px solid #000000;
  }
  
  table td {
    color: #000000;
  }
  
  /* Zebra striping for readability */
  table tbody tr:nth-child(odd) {
    background-color: #ffffff !important;
  }
  
  table tbody tr:nth-child(even) {
    background-color: #f9f9f9 !important;
  }
  
  /* Kurtosys/KSYS Tables */
  .ksys-table,
  [data-selector="base-table"],
  .sc-eDJsVj,
  .sc-dSgHSt {
    width: 100% !important;
    border-collapse: collapse !important;
  }
  
  /* ============================================
     DISCLOSURES & LEGAL TEXT
     ============================================ */
  
  /* Keep all disclosure and legal content visible */
  .disclosure,
  .legal-text,
  .disclaimer,
  .ksys-disclaimersWrapper,
  .ksys-overview-disclaimer,
  .ksys-overview-disclaimers,
  [data-selector*="disclaimer"],
  [data-selector*="disclaimers"],
  .risk-considerations,
  .elementor-widget-ksys-html-js-widget:has([data-selector*="disclaimer"]) {
    display: block !important;
    page-break-inside: avoid;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    padding: 10pt;
    border-top: 1px solid #cccccc;
    font-size: 9pt;
    line-height: 1.4;
    color: #000000 !important;
  }
  
  .disclosure p,
  .legal-text p,
  .disclaimer p {
    margin: 0.5em 0;
    page-break-inside: avoid;
  }
  
  /* ============================================
     ELEMENTOR SPECIFIC
     ============================================ */
  
  .elementor-section {
    page-break-inside: avoid;
    margin-bottom: 1em;
  }
  
  .elementor-column {
    page-break-inside: avoid;
  }
  
  .elementor-widget {
    page-break-inside: avoid;
  }
  
  /* Hide Elementor edit buttons and UI */
  .elementor-editor-active,
  .elementor-editor-preview {
    /* Keep content visible in print */
  }
  
  /* ============================================
     IMAGES
     ============================================ */
  
  img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
  }
  
  /* Hide decorative icons in print */
  img[src*="InformationIcon"],
  img[src*="DownloadIcon"],
  .fa,
  .elementor-icon,
  .kurtosys-menu-icon {
    display: none !important;
  }
  
  /* Keep logos if needed */
  img[src*="logo"],
  img[alt*="Logo"],
  img[alt*="logo"] {
    max-width: 200px;
    height: auto;
  }
  
  /* ============================================
     LISTS
     ============================================ */
  
  ul, ol {
    margin: 0.75em 0;
    padding-left: 2em;
  }
  
  li {
    page-break-inside: avoid;
    margin: 0.25em 0;
  }
  
  /* ============================================
     PAGE BREAKS
     ============================================ */
  
  /* Avoid breaking these elements */
  .elementor-section,
  .elementor-widget-wrap,
  table,
  thead,
  tbody,
  tr,
  .ksys-base-card,
  [data-selector="base-card-wrapper"] {
    page-break-inside: avoid;
  }
  
  /* Force page break before major sections */
  .elementor-section.elementor-top-section:not(:first-child) {
    page-break-before: auto;
  }
  
  /* ============================================
     SPACING & LAYOUT
     ============================================ */
  
  .elementor-container {
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .elementor-row {
    display: block !important;
  }
  
  .elementor-column {
    width: 100% !important;
    display: block !important;
    margin-bottom: 1em;
  }
  
  /* ============================================
     SPECIFIC CONTENT SECTIONS
     ============================================ */
  
  /* Performance Tables */
  [data-ksys-app-template-id="ksys-app-table"],
  [data-ksys-app-template-id="ksys-app-bar-chart"] {
    page-break-inside: avoid;
  }
  
  /* Key Facts & Portfolio Characteristics */
  [data-ksys-app-template-id="ksys-app-fact-list"] {
    page-break-inside: avoid;
  }
  
  /* Materials Download Section - Hide download buttons, keep text */
  [data-ksys-app-template-id="ksys-app-document-list"] {
    page-break-inside: avoid;
  }
  
  [data-selector*="documentDownload"],
  [data-selector*="DownloadIcon"] {
    display: none !important;
  }
  
  /* ============================================
     UTILITY CLASSES
     ============================================ */
  
  .print-hide {
    display: none !important;
  }
  
  .print-show {
    display: block !important;
  }
  
  .print-page-break {
    page-break-before: always;
  }
  
  .print-no-break {
    page-break-inside: avoid;
  }
  
  /* ============================================
     FOOTER & PAGE NUMBERS (Browser Generated)
     ============================================ */
  
  @page {
    margin: 2cm;
    size: A4;
  }
  
  /* ============================================
     COLOR OVERRIDES (Ensure readability)
     ============================================ */
  
  /* Force black text on white background */
  * {
    color: #000000 !important;
    background-color: #ffffff !important;
  }
  
  /* Keep minimal brand color for headings only */
  h2 {
    color: #004E96 !important;
  }
  
  /* Table headers can have light gray background */
  table th {
    background-color: #f5f5f5 !important;
    color: #000000 !important;
  }
  
  /* ============================================
     HIDE SPECIFIC ELEMENTS
     ============================================ */
  
  /* Google Tag Manager */
  noscript,
  iframe[src*="googletagmanager"],
  script {
    display: none !important;
  }
  
  /* Skip links and accessibility elements */
  .screen-reader-text,
  .sr-only,
  .visually-hidden {
    display: none !important;
  }
  
  /* Tooltips */
  [data-selector*="tooltip"],
  .tooltip,
  .elementor-tooltip {
    display: none !important;
  }
  
}

/* ============================================
   PRINT PREVIEW OPTIMIZATIONS
   ============================================ */

@media print, screen and (min-width: 0px) {
  /* Ensure tables are visible in print preview */
  table {
    visibility: visible !important;
  }
}
