/**
 * „OFC Kalendarz zajęć v3" — the visual language of [ofc_plan_tygodnia] (OFC Rekrutacja
 * calendar.css): ink #1c2733, muted #5b6773, lines #dde3e8, accent navy #103a66, status chips,
 * white cards with a colored bar, proportional week grid from 760px up, bottom sheet.
 * Namespaced .ofc-kz3-*.
 */

.ofc-kz3 { margin: 8px 0; color: #1c2733; }
.ofc-kz3-title { margin: 14px 0 8px; font-size: 18px; font-weight: 700; color: #1c2733; }
.ofc-kz3-admin-note {
	margin: 0 0 8px; padding: 8px 12px; font-size: 13px;
	background: #fdf3d7; border-left: 4px solid #9a6700; color: #1c2733;
}
.ofc-kz3-empty {
	margin: 6px 0; padding: 18px 14px; text-align: center;
	background: #f4f7fb; border: 1px dashed #9aa7b6; border-radius: 8px;
	color: #1c2733; font-size: 15px; font-weight: 600;
}

/* ---- legend (several groups) + chips ---- */
.ofc-kz3-legend { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 10px; }
.ofc-kz3-gchip {
	display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
	border: 1.5px solid #dde3e8; border-radius: 999px; padding: 2px 9px;
	background: #fff; color: #1c2733; font-size: 12px; font-weight: 700;
}
.ofc-kz3-gchip .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ofc-kz3-chip {
	display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px;
	font-size: 12px; font-weight: 600; white-space: nowrap;
}
.ofc-kz3-chip.is-now    { background: #e3f4ea; color: #0a7a3d; }
.ofc-kz3-chip.is-next   { background: #e7f3ff; color: #103a66; }
.ofc-kz3-chip.is-cancel { background: #fdecec; color: #b32d2e; }
.ofc-kz3-chip.is-moved  { background: #fdf3d7; color: #9a6700; }
.ofc-kz3-chip.is-src    { background: #eceef0; color: #465a6e; }

/* ---- list: „Zrealizowane zajęcia" (closed) + „Planowane zajęcia" (open) + month sections + cards ---- */
.ofc-kz3-fold { margin: 0 0 14px; }
.ofc-kz3-fold > summary {
	cursor: pointer; list-style: none; padding: 8px 12px;
	border: 1px solid #dde3e8; border-radius: 10px; background: #f4f7fb;
	color: #103a66; font-size: 14px; font-weight: 700;
}
.ofc-kz3-fold > summary::-webkit-details-marker { display: none; }
.ofc-kz3-fold > summary::before { content: "\25B8"; display: inline-block; margin-right: 8px; transition: transform .15s ease; }
.ofc-kz3-fold[open] > summary { margin-bottom: 10px; }
.ofc-kz3-fold[open] > summary::before { transform: rotate(90deg); }
.ofc-kz3-fold > summary:focus-visible { outline: 2px solid #103a66; outline-offset: 2px; }

.ofc-kz3-month, .ofc-kz3-days section { margin-bottom: 16px; }
.ofc-kz3-month h4, .ofc-kz3-days h4 {
	margin: 0 0 8px; padding-bottom: 4px; border-bottom: 1px solid #dde3e8;
	font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #5b6773;
}
.ofc-kz3-days h4.is-today { color: #103a66; }

.ofc-kz3-card {
	display: grid; grid-template-columns: 6px 1fr auto; gap: 0 12px; align-items: center;
	margin-bottom: 8px; padding: 10px 12px 10px 0; cursor: pointer;
	background: #fff; border: 1px solid #dde3e8; border-radius: 10px;
}
.ofc-kz3-card:focus-visible { outline: 2px solid #103a66; outline-offset: 2px; }
.ofc-kz3-card .bar { align-self: stretch; min-height: 34px; border-radius: 10px 0 0 10px; }
.ofc-kz3-card .mid { display: block; min-width: 0; }
.ofc-kz3-card .t1 { display: block; font-size: 15px; font-weight: 700; color: #1c2733; font-variant-numeric: tabular-nums; }
.ofc-kz3-card .t2 { display: block; font-size: 14px; color: #1c2733; }
.ofc-kz3-card .t3 { display: block; font-size: 13px; color: #5b6773; }
.ofc-kz3-card .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ofc-kz3-card.is-now { border-color: #103a66; box-shadow: 0 0 0 2px #103a66; }
.ofc-kz3-card.is-cancelled { background: #fafbfc; }
.ofc-kz3-card.is-cancelled .t1,
.ofc-kz3-card.is-cancelled .t2 { color: #6b7278; text-decoration: line-through; }
.ofc-kz3-card.is-cancelled .bar { opacity: .35; }
.ofc-kz3-card.is-past { opacity: .72; } /* ended: the collapsed „earlier" list, past days of the week */
@media (max-width: 480px) {
	.ofc-kz3-card { grid-template-columns: 6px 1fr; }
	.ofc-kz3-card .side { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; margin-top: 6px; }
	.ofc-kz3-card .side:empty { display: none; }
}

/* ---- week: navigation ---- */
.ofc-kz3-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.ofc-kz3-navbtn {
	appearance: none; width: 34px; height: 34px; padding: 0; cursor: pointer;
	border: 1.5px solid #dde3e8; border-radius: 50%; background: #fff;
	color: #103a66; font-size: 20px; line-height: 1;
}
.ofc-kz3-navbtn:disabled { opacity: .35; cursor: default; }
.ofc-kz3-range { min-width: 12em; text-align: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ofc-kz3-range:focus { outline: none; }
.ofc-kz3-today, .ofc-kz3-jump {
	appearance: none; cursor: pointer; padding: 6px 14px; border-radius: 999px;
	border: 1.5px solid #103a66; background: transparent; color: #103a66;
	font: inherit; font-size: 13px; font-weight: 700;
}
.ofc-kz3-jump { background: #103a66; color: #fff; }
.ofc-kz3-jumprow { text-align: center; margin: 8px 0; }
.ofc-kz3-navbtn:focus-visible, .ofc-kz3-today:focus-visible, .ofc-kz3-jump:focus-visible { outline: 2px solid #103a66; outline-offset: 2px; }

/* ---- week: grid (>= 760px) / day cards (phones) ---- */
.ofc-kz3-grid { display: none; }
@media (min-width: 760px) {
	.ofc-kz3-grid { display: grid; grid-template-columns: 44px repeat(7, 1fr); gap: 0 6px; }
	.ofc-kz3-days { display: none; }
}
.ofc-kz3-dayhead {
	padding: 4px 0 8px; text-align: center; color: #5b6773;
	font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.ofc-kz3-dayhead span { display: block; letter-spacing: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.ofc-kz3-dayhead.is-today { color: #103a66; }
.ofc-kz3-axis { position: relative; }
.ofc-kz3-axis .h {
	position: absolute; right: 6px; transform: translateY(-50%);
	font-size: 11px; color: #5b6773; font-variant-numeric: tabular-nums;
}
.ofc-kz3-daycol { position: relative; background: #fff; border: 1px solid #dde3e8; border-radius: 8px; }
.ofc-kz3-daycol.is-today { background: #f4f9ff; border-color: #9cc3ea; }
.ofc-kz3-daycol .gl { position: absolute; left: 0; right: 0; border-top: 1px dashed #e6eaee; }
.ofc-kz3-nowline { position: absolute; left: -1px; right: -1px; z-index: 2; border-top: 2px solid #c21e1e; pointer-events: none; }
.ofc-kz3-nowline::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: #c21e1e; }
.ofc-kz3-blk {
	position: absolute; display: block; overflow: hidden; cursor: pointer;
	padding: 4px 6px; border: 0; border-radius: 6px; text-align: left;
	font-family: inherit; font-size: 12px; line-height: 1.25;
}
.ofc-kz3-blk:focus-visible { outline: 3px solid #103a66; outline-offset: 1px; z-index: 3; }
.ofc-kz3-blk .c { display: block; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ofc-kz3-blk .m { display: block; font-size: 11px; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ofc-kz3-blk .obl {
	display: block; width: max-content; max-width: 100%; overflow: hidden; margin: 1px 0; padding: 0 4px;
	border-radius: 3px; background: rgba(255, 255, 255, .94); color: #b32d2e;
	font-size: 9px; font-weight: 800; letter-spacing: .04em;
}
.ofc-kz3-blk .obl.mv { background: rgba(255, 238, 196, .96); color: #6b4300; }
.ofc-kz3-blk.is-past { opacity: .6; }
.ofc-kz3-blk.is-cancelled { opacity: .75; background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .45) 0 6px, transparent 6px 12px); }
.ofc-kz3-blk.is-cancelled .c { text-decoration: line-through; }
.ofc-kz3-blk.is-now { box-shadow: 0 0 0 3px #103a66; }

/* ---- bottom sheet (one per page) ---- */
.ofc-kz3-backdrop {
	position: fixed; inset: 0; z-index: 9998; background: rgba(10, 20, 30, .45);
	opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.ofc-kz3-sheet {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; max-width: 560px; margin: 0 auto;
	padding: 18px 18px 26px; background: #fff; border-radius: 16px 16px 0 0;
	box-shadow: 0 -8px 40px rgba(16, 42, 74, .25);
	/* hidden (not focusable) once the slide-out has finished */
	transform: translateY(105%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s;
}
.ofc-kz3-open .ofc-kz3-backdrop { opacity: 1; pointer-events: auto; }
.ofc-kz3-open .ofc-kz3-sheet { transform: translateY(0); visibility: visible; transition: transform .22s ease, visibility 0s; }
.ofc-kz3-sheet-grp { font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.ofc-kz3-sheet h3 { margin: 2px 0 6px; font-size: 20px; color: #1c2733; }
.ofc-kz3-sheet p { margin: 4px 0; font-size: 14px; color: #1c2733; }
.ofc-kz3-sheet .ofc-kz3-sheet-teacher { color: #5b6773; }
.ofc-kz3-sheet-state { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ofc-kz3-sheet-close {
	position: absolute; top: 10px; right: 12px; appearance: none; border: 0; background: transparent;
	color: #5b6773; font-size: 22px; line-height: 1; cursor: pointer;
}
.ofc-kz3-sheet-close:focus-visible { outline: 2px solid #103a66; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
	.ofc-kz3-sheet, .ofc-kz3-backdrop, .ofc-kz3-fold > summary::before { transition: none; }
}
