/**
 * „Plan tygodnia grup kursowych" (v0.195.0) — [ofc_plan_tygodnia] + the
 * [ofc_zapis_wstepny_v2] embed. Mobile-first: per-day agenda cards; the
 * proportional Mon–Sun grid appears from 760px up. Namespaced .ofc-rkr-cal-*.
 */

.ofc-rkr-cal { margin: 8px 0; }
.ofc-rkr-cal-title { margin: 14px 0 8px; font-size: 18px; font-weight: 700; color: #1c2733; }

/* ---- control rows: subject chips + tryb segment ---- */
.ofc-rkr-cal-row {
	display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center;
	margin-bottom: 8px; font-size: 13px; color: #5b6773;
}
.ofc-rkr-cal-lbl { font-weight: 600; }
.ofc-rkr-cal-thin { font-weight: 400; }
.ofc-rkr-cal-schip {
	appearance: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700;
	border: 1.5px solid #dde3e8; border-radius: 999px; padding: 5px 12px;
	background: #fff; color: #5b6773; display: inline-flex; gap: 7px; align-items: center;
}
.ofc-rkr-cal-schip .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ofc-rkr-cal-schip:focus-visible { outline: 2px solid #103a66; outline-offset: 1px; }
.ofc-rkr-cal-schip-all { border-style: dashed; }
.ofc-rkr-cal-schip-all[aria-pressed="true"] { border-color: #103a66; color: #103a66; background: #e7f3ff; border-style: solid; }
.ofc-rkr-cal-seg { display: inline-flex; border: 1px solid #dde3e8; border-radius: 999px; overflow: hidden; background: #fff; }
.ofc-rkr-cal-seg button {
	appearance: none; border: 0; background: transparent; color: #5b6773;
	padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ofc-rkr-cal-seg button[aria-pressed="true"] { background: #103a66; color: #fff; }
.ofc-rkr-cal-seg button:focus-visible { outline: 2px solid #103a66; outline-offset: -2px; }

/* ---- status chips / pills / buttons ---- */
.ofc-rkr-cal-chip {
	display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px;
	font-size: 12px; font-weight: 600; white-space: nowrap;
}
.ofc-rkr-cal-chip.is-ok     { background: #e3f4ea; color: #0a7a3d; }
.ofc-rkr-cal-chip.is-warn   { background: #fdf3d7; color: #9a6700; }
.ofc-rkr-cal-chip.is-full   { background: #fdecec; color: #b32d2e; }
.ofc-rkr-cal-chip.is-closed { background: #eceef0; color: #6b7278; }
.ofc-rkr-cal-onpill {
	display: inline-block; border-radius: 4px; padding: 0 5px;
	font-size: 10px; font-weight: 800; letter-spacing: .04em;
	background: #1c2733; color: #fff; vertical-align: 2px;
}
.ofc-rkr-cal-btn {
	appearance: none; display: inline-block; border: 0; border-radius: 999px; cursor: pointer;
	font: inherit; font-size: 13px; font-weight: 700; padding: 7px 14px;
	background: #103a66; color: #fff; white-space: nowrap; text-decoration: none;
}
.ofc-rkr-cal-btn.is-wl { background: transparent; color: #b32d2e; border: 1.5px solid #b32d2e; }
.ofc-rkr-cal-btn.is-remove { background: transparent; color: #103a66; border: 1.5px solid #103a66; }
.ofc-rkr-cal-btn:focus-visible { outline: 2px solid #103a66; outline-offset: 2px; }
.ofc-rkr-cal-subjlink { font-size: 13px; font-weight: 600; }

/* muting (unaddable always; in form mode everything not selected) */
.ofc-rkr-cal .is-muted { filter: grayscale(.7) opacity(.6); }

/* ---- desktop week grid (>=760px) ---- */
.ofc-rkr-cal-week { display: none; }
@media (min-width: 760px) {
	.ofc-rkr-cal-week { display: grid; gap: 0 6px; }
	.ofc-rkr-cal-agenda { display: none; }
}

/* Zero-subjects prompt (v0.208.0) — centered under the (clean) week header on desktop,
   standalone on mobile; removed by the next render once any subject chip is on. */
.ofc-rkr-cal-picknote {
	text-align: center; padding: 46px 16px; margin: 6px 0;
	background: #f8f9fb; border: 1px dashed #c3cbd5; border-radius: 8px;
	color: #50575e; font-size: 15px; font-weight: 600;
}

/* ---- rotate-mode (v0.207.0; wrapper class .ofc-rkr-cal-rotate, default OFF) ----
   Portrait phones: ONLY the „obróć ekran" note; landscape phones: force the DESKTOP
   grid even under 760px (the whole point of rotating). ≥760px behaves as usual. */
.ofc-rkr-cal-rotnote { display: none; }
@media (max-width: 759.98px) and (orientation: portrait) {
	.ofc-rkr-cal.ofc-rkr-cal-rotate > :not(.ofc-rkr-cal-rotnote) { display: none; }
	.ofc-rkr-cal.ofc-rkr-cal-rotate .ofc-rkr-cal-rotnote {
		display: block; padding: 18px 14px; text-align: center;
		background: #f4f7fb; border: 1px dashed #9aa7b6; border-radius: 8px;
		color: #1c2733; font-size: 15px; font-weight: 600;
	}
}
@media (max-width: 759.98px) and (orientation: landscape) {
	.ofc-rkr-cal.ofc-rkr-cal-rotate .ofc-rkr-cal-agenda { display: none; }
	.ofc-rkr-cal.ofc-rkr-cal-rotate .ofc-rkr-cal-week { display: grid; gap: 0 6px; }
}
.ofc-rkr-cal-dayhead {
	text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .06em;
	text-transform: uppercase; color: #5b6773; padding: 4px 0 8px;
}
.ofc-rkr-cal-axis { position: relative; }
.ofc-rkr-cal-axis .h {
	position: absolute; right: 6px; font-size: 11px; color: #5b6773;
	transform: translateY(-50%); font-variant-numeric: tabular-nums;
}
.ofc-rkr-cal-daycol { position: relative; background: #fff; border: 1px solid #dde3e8; border-radius: 8px; }
.ofc-rkr-cal-daycol .gl { position: absolute; left: 0; right: 0; border-top: 1px dashed #e6eaee; }
.ofc-rkr-cal-blk {
	position: absolute; border-radius: 6px; overflow: hidden; cursor: pointer;
	color: #fff; padding: 4px 6px; font-size: 12px; line-height: 1.25;
	border: 0; text-align: left; font-family: inherit; display: block;
}
.ofc-rkr-cal-blk:focus-visible { outline: 3px solid #103a66; outline-offset: 1px; z-index: 3; }
.ofc-rkr-cal-blk .c { font-weight: 800; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ofc-rkr-cal-blk .m { font-size: 11px; opacity: .92; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
/* ONLINE badge on its own line (v0.196.0; position above code / below hours per setting). */
.ofc-rkr-cal-blk .obl {
	display: block; width: max-content; max-width: 100%; overflow: hidden;
	background: rgba(255,255,255,.94); color: #1c2733; border-radius: 3px;
	font-size: 9px; font-weight: 800; letter-spacing: .04em; padding: 0 4px; margin: 1px 0;
}
/* LISTA REZERWOWA badge (v0.206.1) — same treatment as ONLINE, warm tint; nowrap so
   the JS fit pass can measure overflow and fall back to L.REZERWOWA / L.REZ. */
.ofc-rkr-cal-blk .obl.wlb { background: rgba(255,238,196,.96); color: #6b4300; white-space: nowrap; }
.ofc-rkr-cal-blk.is-online { box-shadow: inset 0 0 0 2px rgba(255,255,255,.75); }
.ofc-rkr-cal-blk.is-selected { box-shadow: 0 0 0 3px #103a66; }

/* ---- mobile agenda ---- */
.ofc-rkr-cal-agenda section { margin-bottom: 18px; }
.ofc-rkr-cal-agenda h2 {
	font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
	color: #5b6773; margin: 0 0 8px; border-bottom: 1px solid #dde3e8; padding-bottom: 4px;
}
.ofc-rkr-cal-card {
	display: grid; grid-template-columns: 6px 1fr auto; gap: 0 12px;
	background: #fff; border: 1px solid #dde3e8; border-radius: 10px;
	padding: 10px 12px 10px 0; margin-bottom: 8px; align-items: center;
}
.ofc-rkr-cal-card.is-selected { border-color: #103a66; box-shadow: 0 0 0 2px #103a66; }
.ofc-rkr-cal-card .bar { border-radius: 10px 0 0 10px; align-self: stretch; }
.ofc-rkr-cal-card .bar.is-online { background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.55) 0 4px, transparent 4px 9px); }
.ofc-rkr-cal-card .mid { cursor: pointer; }
.ofc-rkr-cal-card .t1 { font-weight: 700; font-size: 15px; color: #1c2733; }
.ofc-rkr-cal-card .t1 .sj { font-size: 12px; font-weight: 800; letter-spacing: .05em; margin-right: 6px; }
.ofc-rkr-cal-card .t2 { color: #5b6773; font-size: 13px; }
.ofc-rkr-cal-card .t3 { font-size: 13px; color: #1c2733; font-variant-numeric: tabular-nums; }
.ofc-rkr-cal-card .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* ---- unscheduled list ---- */
.ofc-rkr-cal-unsched { font-size: 13px; color: #5b6773; margin-top: 10px; }
.ofc-rkr-cal-unsched ul { list-style: none; margin: 6px 0 0; padding: 0; }
.ofc-rkr-cal-unsched li { margin: 4px 0; }
.ofc-rkr-cal-unsched .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: baseline; }

/* ---- shared bottom sheet + toast ---- */
.ofc-rkr-cal-backdrop {
	position: fixed; inset: 0; background: rgba(10, 20, 30, .45); z-index: 9998;
	opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.ofc-rkr-cal-sheet {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
	background: #fff; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 40px rgba(16, 42, 74, .25);
	padding: 18px 18px 26px; max-width: 560px; margin: 0 auto;
	transform: translateY(105%); transition: transform .22s ease;
}
.ofc-rkr-cal-open .ofc-rkr-cal-backdrop { opacity: 1; pointer-events: auto; }
.ofc-rkr-cal-open .ofc-rkr-cal-sheet { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
	.ofc-rkr-cal-sheet, .ofc-rkr-cal-backdrop, .ofc-rkr-cal-toast { transition: none; }
}
.ofc-rkr-cal-sheet-subj { font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.ofc-rkr-cal-sheet h3 { margin: 2px 0 6px; font-size: 20px; color: #1c2733; }
.ofc-rkr-cal-sheet p { margin: 4px 0; font-size: 14px; color: #1c2733; }
.ofc-rkr-cal-sheet .ofc-rkr-cal-sheet-teacher { color: #5b6773; }
.ofc-rkr-cal-sheet-actions { margin-top: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ofc-rkr-cal-sheet-close {
	position: absolute; top: 10px; right: 12px; appearance: none; border: 0;
	background: transparent; color: #5b6773; font-size: 22px; cursor: pointer; line-height: 1;
}
.ofc-rkr-cal-toast {
	position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); z-index: 10000;
	background: #1c2733; color: #fff; font-size: 13px; font-weight: 600;
	padding: 10px 16px; border-radius: 10px; max-width: 92vw; word-break: break-word;
	opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.ofc-rkr-cal-toast.show { opacity: 1; transform: translate(-50%, 0); }
