/* Printable Advent pages: make your own Advent calendar, and the colouring sheets.
   On screen they are normal readable pages; in print only the slips, the tick sheet or the colouring sheets remain.
   Builds on /styles.css and /christmas-activities/activities.css. */

.print-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.print-hint {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Make your own Advent calendar: a readable, pickable list on screen. */
.pick-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 1rem 0 0;
}

.pick-tools label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.pick-tools select {
  font: inherit;
  font-weight: 400;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

.picks {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
  display: grid;
  gap: 0.75rem;
}

.pick-choose {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.pick-choose input {
  width: 1.3rem;
  height: 1.3rem;
}

.pick[hidden] {
  display: none;
}

.pick:has(input[data-pick]:not(:checked)) .slip {
  opacity: 0.6;
}

.slip-write input {
  width: 100%;
  font: inherit;
  font-weight: 700;
  font-size: 1.1rem;
  border: 0;
  border-bottom: 2px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 0.2rem 0;
}

.print-only {
  display: none;
}

.ticks {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 12mm;
}

.ticks li {
  display: flex;
  gap: 4mm;
  align-items: center;
  padding: 2.5mm 0;
  border-bottom: 1px solid #999;
  break-inside: avoid;
  font-size: 12pt;
}

.tick-box {
  flex: none;
  width: 8mm;
  height: 8mm;
  border: 1.5px solid #000;
  border-radius: 2mm;
}

.slip {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  column-gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.slip > * {
  grid-column: 2;
}

.slip-day {
  grid-column: 1;
  grid-row: 1 / span 5;
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}

.slip-date,
.slip-need {
  font-size: 0.95rem;
  color: var(--muted);
}

.slip-name {
  font-size: 1.15rem;
}

.slip-more {
  font-size: 0.95rem;
}

/* Colouring sheets */
.sheets {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
}

.sheet {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.2rem;
}

.sheet-name {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.sheet img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.95rem;
}

@page {
  size: A4;
  margin: 10mm;
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .slip-day:empty {
    display: none;
  }

  .no-print,
  .skip-link {
    display: none !important;
  }

  .wrap,
  .narrow {
    max-width: none;
    padding: 0;
    margin: 0;
  }

  .draft-page {
    padding: 0;
  }

  /* Six slips to an A4 page: two columns, three rows, dashed cut lines, and the Famoo strip
     under each six (printables.js adds it; /print-brand.css styles it). */
  .picks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 0;
  }

  .pick[hidden] {
    display: block;
  }

  .pick:has(input[data-pick]:not(:checked)) {
    display: none;
  }

  .pick:has(input[data-pick]:not(:checked)) .slip,
  .slip {
    opacity: 1;
  }

  .slip {
    height: 78mm;
    box-sizing: border-box;
    box-shadow: none;
    border-radius: 0;
    border: 1px dashed #000;
    padding: 8mm;
    break-inside: avoid;
    grid-template-columns: 1fr;
    align-content: center;
    text-align: center;
    row-gap: 2mm;
  }

  .slip > *,
  .slip-day {
    grid-column: 1;
    grid-row: auto;
  }

  .slip-write input {
    text-align: center;
    font-size: 16pt;
    border: 0;
    outline: none;
    box-shadow: none;
  }

  .slip-write input::placeholder {
    color: transparent;
  }

  .picks > .print-brand {
    grid-column: 1 / -1;
    margin-top: 3mm;
    break-after: page;
  }

  .picks > .print-brand-last {
    break-after: auto;
  }

  /* The tick sheet prints on its own. */
  body.print-ticks .picks {
    display: none;
  }

  body.print-ticks .print-only {
    display: block;
  }

  .slip-day {
    font-size: 30pt;
    color: #000;
  }

  .slip-name {
    font-size: 16pt;
  }

  .slip-what {
    font-size: 12pt;
  }

  .slip-date,
  .slip-need {
    font-size: 10pt;
    color: #333;
  }

  /* One colouring sheet to a page. */
  .sheets {
    display: block;
    margin: 0;
  }

  .sheet {
    box-shadow: none;
    padding: 0;
    break-after: page;
    text-align: center;
  }

  .sheet:last-child {
    break-after: auto;
  }

  .sheet-name {
    font-size: 14pt;
    margin-bottom: 6mm;
  }

  .sheet img {
    width: auto;
    max-width: 100%;
    max-height: 222mm;
    margin: 0 auto;
  }

  body.print-one .sheet:not(.print-this) {
    display: none;
  }
}
