/*
 * Dodatki do Bootstrap 5.3: kolory przedmiotów, siatka tygodnia, widok dnia.
 * Wszystko poza tym pochodzi z bootstrap.min.css.
 */

html { font-size: 17px; }
@media (min-width: 1500px) { html { font-size: 19px; } }

/* --- kolor przedmiotu: 10 stałych odcieni z palety Bootstrapa.
   color-mix miesza kolor bazowy z tłem/tekstem strony, więc te same
   reguły działają w trybie jasnym i ciemnym. --- */

.subj {
  --hue: var(--bs-blue);
  background: color-mix(in srgb, var(--hue) 20%, var(--bs-body-bg));
  color: color-mix(in srgb, var(--hue) 70%, var(--bs-body-color));
  border-left: 5px solid var(--hue);
}
[data-bs-theme="dark"] .subj {
  background: color-mix(in srgb, var(--hue) 30%, var(--bs-body-bg));
  color: color-mix(in srgb, var(--hue) 35%, var(--bs-body-color));
}
.sub-0 { --hue: var(--bs-blue); }
.sub-1 { --hue: var(--bs-green); }
.sub-2 { --hue: var(--bs-orange); }
.sub-3 { --hue: var(--bs-pink); }
.sub-4 { --hue: var(--bs-purple); }
.sub-5 { --hue: var(--bs-teal); }
.sub-6 { --hue: var(--bs-red); }
.sub-7 { --hue: #6c9a1f; }             /* limonka — Bootstrap jej nie ma */
.sub-8 { --hue: var(--bs-cyan); }
.sub-9 { --hue: var(--bs-indigo); }
.subj .badge { color: var(--bs-body-color); }

/* --- widok dnia --- */

.child-card { border-top: 5px solid var(--child, var(--bs-primary)); }
.lesson .time { width: 4.2rem; flex: none; font-variant-numeric: tabular-nums; }
.lesson.state-teraz { background: var(--bs-primary-bg-subtle); outline: 2px solid var(--bs-primary); }
.lesson.state-teraz .time .fw-bold { color: var(--bs-primary); }
.lesson.state-po { opacity: .75; }
.kind-odwolane .fw-bold { text-decoration: line-through; }
.kind-odwolane .subj { filter: grayscale(.8); }

/* --- siatka tygodnia --- */

table.grid { table-layout: fixed; min-width: 720px; }
table.grid .slotcol { width: 5.2rem; }
table.grid thead th, table.grid tbody .slotcol { background: var(--bs-tertiary-bg); }
table.grid thead th { font-weight: 700; }
table.grid thead th.table-primary { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); box-shadow: inset 0 -3px 0 var(--bs-primary); }
table.grid td { height: auto; min-height: 5rem; vertical-align: top; }
table.grid .cell {
  border: 0;
  min-height: 4.8rem;
  height: auto;
  white-space: normal;
  align-items: stretch;
}
table.grid .cell:hover, table.grid .cell:focus-visible { box-shadow: inset 0 0 0 3px var(--bs-primary); }
table.grid .cell .plus { opacity: 0; line-height: 4.2rem; }
table.grid .cell:hover .plus, table.grid .cell:focus-visible .plus { opacity: 1; }
table.grid .cell .subj {
  font-size: .82rem;
  line-height: 1.2;
  width: 100%;
  min-height: 4.4rem;
  overflow-wrap: break-word;
  box-sizing: border-box;
}
table.grid .cell .subj .fw-bold { line-height: 1.25; font-size: .88rem; }

.week-days .week-tap {
  border: 0;
  background: transparent;
  color: inherit;
}
.week-days .week-tap:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }

@media (max-width: 767.98px) {
  html { font-size: 16px; }
}

/* --- drobiazgi --- */

.dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; vertical-align: middle; border: 1px solid rgba(0,0,0,.2); }
