/* Rules for one screen each: Attendance, the Payslip, Goal progress, and
 * print. See base.css for the order. */

/* ---- Attendance ----------------------------------------------------------- */

.btn-lg {
  height: 3rem;
  font-size: 1rem;
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.month-nav-label {
  min-width: 9rem;
  font-weight: 600;
  text-align: center;
}

.day {
  display: grid;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
}

.day-date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.day-entries {
  display: grid;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.day-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.day-entry .list-main {
  flex: 1 1 10rem;
}

.sheet td,
.sheet th {
  padding: 0.375rem 0.25rem;
  text-align: center;
}

.sheet th:first-child,
.sheet td:first-child {
  position: sticky;
  left: 0;
  padding-inline: 0.75rem;
  background: var(--card);
  text-align: start;
}

.mark {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
}

.mark[data-tone="success"] {
  background: var(--success-soft);
  color: var(--success);
}

.mark[data-tone="warning"] {
  background: var(--warning-soft);
  color: var(--warning);
}

.mark[data-tone="danger"] {
  background: var(--danger-soft);
  color: var(--danger);
}

.mark[data-tone="info"] {
  background: var(--info-soft);
  color: var(--info);
}

.mark[data-tone="neutral"] {
  background: var(--muted);
  color: var(--muted-foreground);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.schedule-grid {
  display: grid;
  gap: 0.75rem;
}

.schedule-day {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--hairline);
}

.schedule-day .check .small {
  margin-left: 0.25rem;
}

/* Flexible has no Shifts to choose. */
form:has(input[name="mode"][value="flexible"]:checked)
  [data-hide-when-flexible] {
  display: none;
}

/* ---- Payslip: a page made to be printed and signed ---------------------- */
.payslip {
  display: grid;
  gap: 1.25rem;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.payslip-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

.payslip-banner {
  padding: 0.75rem 1rem;
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  font-weight: 500;
}

.payslip-signatures {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  margin-top: 3rem;
}

.signature {
  min-width: 12rem;
  padding-top: 0.375rem;
  border-top: 1px solid var(--foreground);
}

/* ---- Home ---------------------------------------------------------------- */

/* One column of cards inside .columns, so each side stacks on its own. */
.column {
  display: grid;
  align-content: start;
  gap: 1.5rem;
  min-width: 0;
}

/* A waiting item: its buttons drop under the name when the row is narrow. */
.need {
  flex-wrap: wrap;
}

.need .list-main {
  flex: 1 1 10rem;
}

.need .list-main > * {
  white-space: normal;
}

@media (pointer: coarse) {
  .need .btn {
    min-height: 2.75rem;
  }
}

.all-clear {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  color: var(--muted-foreground);
}

.all-clear .icon {
  color: var(--success);
}

.today-off {
  margin-top: 0.75rem;
}

/* One number on one line, opening the page behind it. */
.summary-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
}

.summary-link:hover {
  background: var(--accent);
}

.summary-value {
  margin-inline-start: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: end;
}

/* Goal progress: the native bar, in the brand colour. */
.progress {
  width: 100%;
  height: 0.5rem;
  accent-color: var(--primary-fill);
}

@media print {
  .no-print {
    display: none;
  }

  body {
    background: none;
  }
}
