@media screen {
  .print-only {
    display: none;
  }
  .chart-container {
    height: 400px;
    width: 430px;
  }
}

/* Print styles */
@page {
  margin: 0;
  size: 1920px 1357px;
}

@media print {
  /* Reset body and root styles for print */
  html, body {
    margin: 0;
    padding: 0;
    background: white !important;
    min-height: initial !important;
  }

  /* Hide regular page elements when printing */
  .no-print {
    display: none !important;
  }

  /* Reset container background */
  .print-container {
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Print page layout */
  .print-page {
    position: relative;
    padding: 50px;
    margin: 0 auto;
    background: white;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 1920px !important; /* Fixed width */
    height: 1340px !important; /* Fixed height */
    page-break-inside: avoid;
    overflow: hidden;
    page-break-before: always;

  }

  /* Add page break after all pages except the last one */
  .print-page:not(:last-child) {
    page-break-after: always;
  }

  /* Header and footer styles */
  .print-header {
    position: relative;
    width: 100%;
    height: 80px;
    background: white;
  }

  .print-footer {
    position: relative;
    width: 100%;
    height: 40px;
    border-top: 1px solid #eee;
    background: white;
    margin-top: auto;
  }

  /* Content area */
  .print-content {
    flex: 1;
    width: 100%;
    padding: 20px 0;
    overflow: visible;
  }

  /* Page numbers */
/*  .print-page-number::after {
    content: counter(page);
  }
*/
  /* Reset card styles for print */
  .content-card {
    border: 1px solid #262626 !important;
    box-shadow: none !important;
    background: white !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Add margin between cards when multiple cards on same page */
  .content-card.mb-8 {
    margin-bottom: 2rem !important;
  }

  .card-header {
    border-bottom: 1px solid #262626 !important;
  }

  .carbon-chart {
    width: 550px !important; /* Print width */
    height: 400px !important;
  }

  /* Ensure ECharts renders correctly */
  .echarts-for-react {
    width: 100% !important;
    height: auto !important;
    min-height: 300px !important;
    max-height: 400px !important;
    page-break-inside: avoid;
  }

  /* Force rendering of all elements */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Grid layouts */
  .grid {
    display: grid !important;
    width: 100% !important;
    gap: 1rem !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .grid-cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Ensure all content is visible */
  .card-content {
    overflow: visible !important;
    width: 100% !important;
  }

  .chart-container {
    height: 710px !important; /* Increase height to fit chart */
    width: 960px !important; /* Increase height to fit text boxes */
  }
}
