/* css/print.css */

/* Landscape A4 */
@page {
  size: A4 landscape;
  margin: 10mm;
}

:root {
  --table-border: 1px solid var(--oxford-solid-40);
}

/* ———————————————————————————— */
/* Global styles (screen & print) */
body {
  background: white;
  color: #000;
  font-size: 13px !important;
}

/* Headings */
h1,
h2,
h3 {
  margin: 0 0 10px 0;
  padding: 0;
}

h1 {
  margin-bottom: 5px;
}

h2 {
  margin-bottom: 20px;
}

/* Table layout */
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: var(--table-border);
}

thead {
  background: var(--oxford-20);
  line-height: 1.4em;
}

th,
td {
  border: var(--table-border);
  padding: 0px 4px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 16px;
}

/* Zebra striping for alternating rows */
tbody tr:nth-child(even) {
  background-color: var(--oxford-10);
}

/* Teilnehmer_in column */
th:first-child,
td:first-child {
  text-align: left;
  width: 200px;
  font-weight: bold;
}

/* Gruppe column */
th:nth-child(2),
td:nth-child(2) {
  width: 120px;
}

/* Bemerkung column (last) */
table th:last-child,
table td:last-child {
  width: 120px;
}

/* Day columns */
table th:nth-child(n+3):not(:last-child),
table td:nth-child(n+3):not(:last-child) {
  width: auto;
}

/* Smaller font for day counts under the date */
th small {
  display: block;
  font-size: smaller;
  font-weight: normal;
  margin-top: 0px;
  color: var(--oxford-60);
}

/* ———————————————————————————— */
/* Screen only tweaks */
@media screen {
  body {
    /* 200px vertical margin; horizontally centered in a 297 mm‑wide container */
    max-width: 297mm;
    margin: 50px auto;
    padding: 20px 25px;
  }
}

/* ———————————————————————————— */
/* Print only tweaks */
@media print {

  html,
  body {
    background-color: white;
  }

  /* zero out body margin for print */
  body {
    margin: 0;
  }

  /* force backgrounds & colors to print where possible */
  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  thead {
    display: table-header-group;
  }

  tr {
    page-break-inside: avoid;
  }

  a[href]:after {
    content: none !important;
  }
}


/* Position the toolbar in the top‑right on screen */
#print_toolbar {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 999;
}

/* Hide entire toolbar (and button) when printing */
@media print {
  #print_toolbar {
    display: none !important;
  }
}


.print-button {
  /* optional button‑like styling */
  padding: 0.4em 0.8em;
  border: 1px solid currentColor;
  border-radius: 0.25em;
  font-size: 1em;
  background: transparent;
  transition: background 0.2s;
}

.print-button:hover,
.print-button:focus {
  background: rgba(0, 0, 0, 0.05);
}

/* 4) Hide the button when actually printing */
@media print {
  .print-button {
    display: none !important;
  }
}