@page {
  margin: 0.15in;
}

/* ===========================
   print_test.css
   =========================== */

@media print {
  html, body {
    margin: 0;
    padding: 4px 8px; /* top-bottom: 4px, left-right: 8px */
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background: #fff;
    color: #000;
    font-family: Verdana, Arial, sans-serif;
    font-size: 7pt;
    line-height: 1.25;
  }

  body,
  #Leaf_Report {
    font-size: 7pt;
  }

  #globalContainer {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
  }

  #Leaf_Report {
    /* Consider removing scale if you’re tightening spacing */
    transform: none;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 16px 16px 16px;
    box-sizing: border-box;
    background: #fff;
  }

  .scale-smaller {
    transform: scale(0.96);
    transform-origin: top center;
  }

  .do_not_print,
  .screen-only {
    display: none !important;
  }

  .print-only {
    display: inline !important;
  }

  .header-block {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
    font-family: Verdana, Arial, sans-serif;
    font-size: 7pt;
    color: #000;
  }

  .header-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px; /* You can lower this to reduce space */
  }

  .header-row > div:first-child {
    align-self: flex-start;
  }

  /* Reduce any extra margin accidentally added by included components */
  .header-block + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

  .program-title {
    font-size: 8pt;
    font-weight: bold;
    line-height: 1.3;
    margin-top: 4px;
  	margin-bottom: 2px;
    text-align: right;
  }

  .program-dates {
    font-size: 8pt;
    line-height: 1.2;
    margin-bottom: 4px;
    text-align: right;
  }

.program-description {
  font-size: 8pt;
  line-height: 1.4;
  margin-top: 6px;
	
}

  
/* Shared base style */
.data, .data_label {
  font-size: 7pt;
  line-height: 1.2;
}

/* Right-align numerical data */
.data {
  text-align: right;
}

/* Left-align labels */
.data_label {
  text-align: left;
}

/* Emphasized section titles */
.data_title {
  font-size: 8pt;
  font-weight: bold;
  line-height: 1.2;
  margin-top: 4px;
  margin-bottom: 2px;
  text-align: left;
}
    table.performance {
      table-layout: fixed;
      width: 100%;
      border-collapse: collapse;
      font-size: 8pt;
	  line-height: 1.4 !important;	
    }
    table.performance th,
    table.performance td {
      border: 1px solid #fff;
      padding: 4px;
      line-height: 1.4	!important;
      text-align: right;
    }
    table.performance th {
      font-weight: normal;
      background-color: #006699;
      color: #fff;
    }
    table.performance td.data.bold {
      font-weight: normal;
    }
    .table_header {
      text-align: left;
      background-color: #006699;
      color: #ffffff;
      padding-left: 1px;
    }	
	table, th, td {
    font-size: 7pt;
    padding: 2px 3px;
    line-height: 1.2;
    vertical-align: top;
    border-collapse: collapse;
    width: 100% !important;
  }

  h1, h2, h3 {
    font-size: 8pt;
  }

  .stats-block {
    page-break-inside: avoid;
    font-size: 7pt;
    line-height: 1.1;
  }

  .footer {
    text-align: center;
    font-size: 7pt;
    margin-top: 10px;
  }

  .disclaimer-text {
    font-size: 7pt;
    line-height: 1.3;
    text-align: justify;
    margin: 0px auto;
    max-width: 100%;
  }

  .force-page-break {
    page-break-before: always;
  }
	
@media print {
  /* Ensure chart height is consistent in print 
  iframe[src*="underwater-chart"] {
    height: 160px !important;
    max-height: 160px !important;
    overflow: hidden !important;
  }

/* Ensure internal chart container is not clipped 
#chart,
.apexcharts-canvas,
.apexcharts-svg {
  height: auto !important;
  max-height: 160px !important;
  overflow: visible !important;
}

  /* Legend visibility and styling
  .apexcharts-legend {
    display: flex !important;
    justify-content: center;
    flex-wrap: wrap;
    padding-bottom: 6pt !important;
  }

  .apexcharts-legend-text {
    font-size: 7pt !important;
    fill: #000 !important; /* fallback for some printers 
    color: #000 !important;
  }

  .apexcharts-xaxis text,
  .apexcharts-yaxis text,
  .apexcharts-tooltip {
    font-size: 7pt !important;
  }
}

*/
	
	.stats-block,
	table,
	tr,
	td,
	th {
  page-break-inside: avoid;
}

