/* Print View Styles */

/* Print preview page layout (screen only) */
body.print-preview {
  background: #525659;
  margin: 0;
  padding: 2rem 1rem;
}

body.print-preview .print-page {
  max-width: 210mm; /* A4 width */
  margin: 0 auto;
  background: white;
  padding: 20mm; /* Typical A4 margins */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Screen-only elements */
.print-hint {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px 20px;
  background: #4caf50;
  color: white;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.print-hint button {
  margin-left: 10px;
  padding: 5px 15px;
  background: white;
  color: #4caf50;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-weight: bold;
}

/* Print media query */
@media print {
  /* Reset page styling for actual print */
  body.print-preview {
    background: white;
    padding: 0;
    margin: 0;
  }

  body.print-preview .print-page {
    max-width: none;
    padding: 0;
    box-shadow: none;
    margin: 0;
  }

  /* Hide non-printable elements */
  .no-print,
  .print-hint,
  .tabs-bar {
    display: none !important;
  }

  /* Page break controls */
  .print-section {
    page-break-after: always;
    page-break-inside: avoid;
  }

  .print-section:last-child {
    page-break-after: auto;
  }

  /* Ensure charts and tables don't break across pages */
  .competence,
  .spider-overview,
  .bar-charts-overview,
  .competence-bar-chart,
  .comments-overview {
    page-break-inside: avoid;
  }

  h3,
  h4 {
    page-break-after: avoid;
  }
}
