/*
 * Plan akci KCT Jicin – verejna tabulka (shortcode [kct_plan]).
 * Generuje KCT_Plan_Render::table_html(), filtry a razeni doplnuje plan-table.js. Navazuje na tokeny sablony
 * webu (--p-green, --p-soft, --p-line, --p-line-strong, --p-ink, --p-red, --radius) s fallbacky; sedy text
 * je zamerne tmavsi nez --p-muted sablony (citelnost tabulky).
 *
 * Rozlozeni:
 *   - spolecne styly (nastroje, filtry, stitky, paticka, prazdny stav),
 *   - obrazovka >= 720 px: tabulka se sloucenym sloupcem mesice,
 *   - obrazovka < 720 px: karty po mesicich,
 *   - tisk: A4 na vysku, cernobile, vzhled jako PDF/Excel planu.
 */

/* ------------------------------------------------------------------ */
/* Spolecne                                                            */
/* ------------------------------------------------------------------ */

.kct-plan {
	--kp-green: var(--p-green, #1e7b3c);
	--kp-soft: var(--p-soft, #eef3eb);
	--kp-line: var(--p-line, #e2e6de);
	--kp-line-strong: var(--p-line-strong, #d7ddd2);
	--kp-ink: var(--p-ink, #1f2b1b);
	/* Seda pro vedlejsi text (kontrast ~8:1 na bile) a minule akce (~6,5:1) – bez pruhlednosti. */
	--kp-muted: #4b5347;
	--kp-past: #575f53;
	/* Okraj ovladacich prvku filtru (kontrast >= 3:1 i na svetle zelenem panelu). */
	--kp-control-line: #7a8476;
	--kp-red: var(--p-red, #c1272d);
	--kp-radius: var(--radius, 12px);
	--kp-bg: #ffffff;
	/* Pruhy po radcich (kazdy druhy radek) a najeti mysi – najeti je tmavsi, at je videt i na pruhu. */
	--kp-stripe: #e9f1e4;
	--kp-hover: #dae7d2;
	/* Kazdy druhy mesic jinym odstinem (piskovy): radek, pruh, najeti mysi, bunka mesice. */
	--kp-m2-bg: #fbf7ee;
	--kp-m2-stripe: #f1e9d6;
	--kp-m2-hover: #e7dcc1;
	--kp-m2-month: #efe6cf;
	--kp-warn-bg: #fff6dc;
	--kp-warn-line: #e0b84a;

	position: relative;
	margin: 1.5em 0;
	color: var(--kp-ink);
	text-align: left;
}

.kct-plan *,
.kct-plan *::before,
.kct-plan *::after {
	box-sizing: border-box;
}

.kct-plan .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Nadpis "PLAN AKCI - 2027" – na obrazovce ho nahrazuje nadpis stranky, v tisku je videt. */
.kct-plan .kct-plan-title {
	display: none;
}

/* Radek s terminem pro karty na mobilu – jinde skryty. */
.kct-plan .kct-plan-when {
	display: none;
}

/* --- Nastroje (tisk, stazeni) --- */

.kct-plan .kct-plan-tools {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: .5em;
	margin: 0 0 .65em;
	padding: 3px; /* misto pro obrys fokusu (rodic muze mit overflow) */
}

/*
 * Nadpis planu (shortcode nadpis="…") a nastroje v jednom radku; na uzke obrazovce se nastroje zalomi pod nadpis.
 * Nadpis ma i tridu sablony kct-p-section (barva, verzalky, linka) – tady jen vetsi a bez okraje.
 */
.kct-plan .kct-plan-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5em 1em;
	margin: 0 0 .65em;
}

.kct-plan .kct-plan-head .kct-plan-heading {
	flex: 1 1 auto;
	margin: 0;
	font-size: clamp(22px, 18px + 1.1vw, 28px);
	line-height: 1.2;
}

.kct-plan .kct-plan-head .kct-plan-tools {
	margin: 0;
}

.kct-plan .kct-plan-tools .kct-plan-print,
.kct-plan .kct-plan-tools .kct-plan-download {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45em;
	min-height: 2.4em;
	margin: 0;
	padding: .45em 1.05em;
	border: 1px solid var(--kp-green);
	border-radius: 999px;
	background: var(--kp-bg);
	box-shadow: none;
	color: var(--kp-green);
	font: inherit;
	font-size: .875em;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.kct-plan .kct-plan-tools .kct-plan-print:hover,
.kct-plan .kct-plan-tools .kct-plan-download:hover {
	background: var(--kp-green);
	color: #ffffff;
	text-decoration: none;
}

.kct-plan .kct-plan-tools .kct-plan-print:focus-visible,
.kct-plan .kct-plan-tools .kct-plan-download:focus-visible,
.kct-plan a.kct-plan-name:focus-visible {
	outline: 2px solid var(--kp-green);
	outline-offset: 2px;
}

.kct-plan .kct-plan-ico {
	display: block;
	flex: 0 0 auto;
	width: 1.05em;
	height: 1.05em;
	max-width: none;
}

/* --- Filtry a razeni (plan-table.js, jen tabulka s data-filters="1") --- */

/* Skryte prvky (radky, mesice, ovladani) – i proti display: flex/block karet na mobilu. */
.kct-plan [hidden] {
	display: none !important;
}

.kct-plan .kct-plan-filters {
	margin: 0 0 1em;
	padding: .85em 1em .8em;
	border: 1px solid var(--kp-line-strong);
	border-radius: var(--kp-radius);
	background: var(--kp-soft);
	color: var(--kp-ink);
	font-size: .9375em;
	line-height: 1.35;
}

.kct-plan .kct-plan-f-main,
.kct-plan .kct-plan-f-panel {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: .7em 1em;
}

.kct-plan .kct-plan-f-panel {
	margin-top: .75em;
}

.kct-plan .kct-plan-f-field {
	display: flex;
	flex-direction: column;
	gap: .3em;
	min-width: 0;
	margin: 0;
	padding: 0;
	font-weight: 400;
}

.kct-plan .kct-plan-f-search {
	flex: 1 1 18em;
}

.kct-plan .kct-plan-f-panel .kct-plan-f-field {
	flex: 0 1 13em;
}

.kct-plan .kct-plan-f-label {
	color: var(--kp-muted);
	font-size: .78em;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.kct-plan .kct-plan-f-input,
.kct-plan .kct-plan-f-select {
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	min-height: 2.5em;
	margin: 0;
	padding: .45em .75em;
	border: 1px solid var(--kp-control-line);
	border-radius: 8px;
	background-color: var(--kp-bg);
	box-shadow: none;
	color: var(--kp-ink);
	font: inherit;
	/* Aspon 16 px – jinak iPhone pri kliknuti do pole stranku priblizi. */
	font-size: max(16px, 1em);
	line-height: 1.3;
}

.kct-plan .kct-plan-f-input::placeholder {
	color: var(--kp-muted);
	opacity: 1;
}

.kct-plan .kct-plan-f-types {
	display: flex;
	flex-direction: column;
	gap: .3em;
	min-width: 0;
}

.kct-plan .kct-plan-f-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .4em;
}

.kct-plan .kct-plan-chip,
.kct-plan .kct-plan-f-toggle {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: .45em;
	width: auto;
	min-width: 0;
	min-height: 2.5em;
	margin: 0;
	padding: .35em .85em .35em .4em;
	border: 1px solid var(--kp-control-line);
	border-radius: 999px;
	background: var(--kp-bg);
	box-shadow: none;
	color: var(--kp-ink);
	font: inherit;
	font-size: .95em;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.kct-plan .kct-plan-chip:hover,
.kct-plan .kct-plan-f-toggle:hover {
	border-color: var(--kp-green);
	background: var(--kp-bg);
	color: var(--kp-ink);
}

.kct-plan .kct-plan-chip-key {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.8em;
	height: 1.8em;
	padding: 0 .3em;
	border-radius: 999px;
	background: var(--kp-soft);
	color: var(--kp-green);
	font-size: .85em;
	font-weight: 800;
}

.kct-plan .kct-plan-chip-n {
	color: var(--kp-muted);
	font-size: .85em;
	font-weight: 600;
}

.kct-plan .kct-plan-chip[aria-pressed="true"],
.kct-plan .kct-plan-chip[aria-pressed="true"]:hover {
	border-color: var(--kp-green);
	background: var(--kp-green);
	color: #ffffff;
}

.kct-plan .kct-plan-chip[aria-pressed="true"] .kct-plan-chip-key {
	background: #ffffff;
	color: var(--kp-green);
}

.kct-plan .kct-plan-chip[aria-pressed="true"] .kct-plan-chip-n {
	color: #ffffff;
}

.kct-plan .kct-plan-f-check {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	min-height: 2.5em;
	margin: 0;
	padding: 0;
	color: var(--kp-ink);
	font-weight: 600;
	cursor: pointer;
}

.kct-plan .kct-plan-f-check input {
	flex: 0 0 auto;
	width: 1.2em;
	height: 1.2em;
	margin: 0;
	accent-color: var(--kp-green);
	cursor: pointer;
}

.kct-plan .kct-plan-f-toggle {
	display: none;
	padding-left: .95em;
}

.kct-plan .kct-plan-f-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5em;
	height: 1.5em;
	padding: 0 .35em;
	border-radius: 999px;
	background: var(--kp-green);
	color: #ffffff;
	font-size: .8em;
	font-weight: 800;
}

.kct-plan .kct-plan-f-status {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .3em 1em;
	margin-top: .75em;
}

.kct-plan .kct-plan-f-count {
	margin: 0;
	color: var(--kp-ink);
	font-weight: 700;
}

.kct-plan .kct-plan-f-count:focus {
	outline: none;
}

.kct-plan .kct-plan-f-count:focus-visible {
	outline: 2px solid var(--kp-green);
	outline-offset: 2px;
}

/* Rezim vysokeho kontrastu (Windows): zapnuty typ akce musi byt poznat i bez barev stranky. */
@media (forced-colors: active) {
	.kct-plan .kct-plan-chip[aria-pressed="true"] {
		forced-color-adjust: none;
		border-color: Highlight;
		background: Highlight;
		color: HighlightText;
	}

	.kct-plan .kct-plan-chip[aria-pressed="true"] .kct-plan-chip-n {
		color: HighlightText;
	}
}

.kct-plan .kct-plan-f-reset {
	-webkit-appearance: none;
	appearance: none;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--kp-green);
	font: inherit;
	font-weight: 700;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: underline;
	text-underline-offset: .2em;
	cursor: pointer;
}

.kct-plan .kct-plan-f-reset:hover {
	background: none;
	color: var(--kp-ink);
}

.kct-plan .kct-plan-f-input:focus-visible,
.kct-plan .kct-plan-f-select:focus-visible,
.kct-plan .kct-plan-chip:focus-visible,
.kct-plan .kct-plan-f-toggle:focus-visible,
.kct-plan .kct-plan-f-reset:focus-visible,
.kct-plan .kct-plan-f-check input:focus-visible {
	outline: 2px solid var(--kp-green);
	outline-offset: 2px;
}

/* Prazdny vysledek filtru. */
.kct-plan .kct-plan-f-empty {
	margin: 0;
	padding: 1em 1.25em;
	border: 1px dashed var(--kp-line-strong);
	border-radius: var(--kp-radius);
	background: var(--kp-soft);
	color: var(--kp-ink);
}

/* Poznamka o vyberu – jen v tisku. */
.kct-plan .kct-plan-f-print {
	display: none;
}

/* Letosni plan: "Zobrazit probehle akce (N)" / "Skryt probehle akce" na zacatku tabulky (plan-table.js). */
.kct-plan .kct-plan-past {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .6em;
	width: 100%;
	min-height: 2.6em;
	margin: 0 0 .75em;
	padding: .55em 1em;
	border: 1px dashed var(--kp-green);
	border-radius: var(--kp-radius);
	background: var(--kp-soft);
	box-shadow: none;
	color: var(--kp-green);
	font: inherit;
	font-size: .9375em;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: normal;
	text-transform: none;
	text-align: center;
	cursor: pointer;
	transition: background-color .15s ease;
}

/* Sipka: dolu = rozbalit probehle akce, nahoru = schovat. */
.kct-plan .kct-plan-past::before {
	content: "";
	flex: 0 0 auto;
	width: .5em;
	height: .5em;
	margin-top: -.25em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.kct-plan .kct-plan-past[aria-expanded="true"]::before {
	margin-top: .25em;
	transform: rotate(-135deg);
}

.kct-plan .kct-plan-past:hover {
	background: var(--kp-hover);
}

.kct-plan .kct-plan-past:focus-visible {
	outline: 2px solid var(--kp-green);
	outline-offset: 2px;
}

/* Razeni kliknutim na hlavicku sloupce. */
.kct-plan .kct-plan-sort {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: .4em;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	text-align: inherit;
	text-transform: inherit;
	white-space: nowrap;
	cursor: pointer;
}

.kct-plan .kct-plan-sort:hover {
	background: none;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: .25em;
}

.kct-plan .kct-plan-sort:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

/* Sipka: slaba = jde radit, plna nahoru/dolu = aktivni razeni. */
.kct-plan .kct-plan-sort-ico {
	display: inline-block;
	width: 0;
	height: 0;
	border-right: .3em solid transparent;
	border-left: .3em solid transparent;
	border-top: .38em solid currentColor;
	opacity: .45;
}

.kct-plan th[aria-sort="ascending"] .kct-plan-sort-ico {
	border-top: 0;
	border-bottom: .38em solid currentColor;
	opacity: 1;
}

.kct-plan th[aria-sort="descending"] .kct-plan-sort-ico {
	opacity: 1;
}

/* Jine razeni nez podle data: bez sloupce mesice. */
.kct-plan .kct-plan-table.is-flat .kct-plan-c-month {
	display: none;
}

/* --- Nahled nezverejneneho roku (jen admin) --- */

.kct-plan .kct-plan-preview-bar {
	margin: 0 0 .85em;
	padding: .65em 1em;
	border: 1px solid var(--kp-warn-line);
	border-left-width: 4px;
	border-radius: 8px;
	background: var(--kp-warn-bg);
	color: var(--kp-ink);
	font-size: .9em;
	font-weight: 600;
}

/* --- Prazdny stav --- */

.kct-plan.kct-plan--empty > p:not(.kct-plan-preview-bar) {
	margin: 0;
	padding: 1em 1.25em;
	border: 1px dashed var(--kp-line-strong);
	border-radius: var(--kp-radius);
	background: var(--kp-soft);
	color: var(--kp-muted);
}

/* --- Obsah bunek (spolecne pro tabulku i karty) --- */

.kct-plan .kct-plan-name {
	color: var(--kp-ink);
	font-weight: 600;
}

.kct-plan a.kct-plan-name {
	color: var(--kp-green);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--kp-line-strong);
	text-decoration-thickness: 1px;
	text-underline-offset: .2em;
	transition: text-decoration-color .15s ease;
}

.kct-plan a.kct-plan-name:hover {
	color: var(--kp-green);
	text-decoration-color: currentColor;
}

.kct-plan .kct-plan-note {
	color: var(--kp-muted);
	font-style: italic;
	font-weight: 400;
}

.kct-plan .kct-plan-badge {
	display: inline-block;
	margin-left: .15em;
	padding: .2em .6em .15em;
	border-radius: 999px;
	background: var(--kp-red);
	color: #ffffff;
	font-size: .68em;
	font-style: normal;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .06em;
	text-transform: uppercase;
	vertical-align: .15em;
	white-space: nowrap;
}

.kct-plan .kct-plan-badge--unplanned {
	border: 1px solid var(--kp-line-strong);
	background: var(--kp-soft);
	color: var(--kp-ink);
}

/* Odkaz na fotogalerii akce (mu-plugin kct-propojeni): „fotky“, album z Rajcete „Rajče ↗“. V tisku skryty. */
.kct-plan .kct-plan-photos {
	display: inline-block;
	margin-left: .15em;
	padding: .1em .55em;
	border: 1px solid var(--kp-line-strong);
	border-radius: 999px;
	background: var(--kp-soft);
	color: var(--kp-green);
	font-size: .75em;
	font-style: normal;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
	vertical-align: .1em;
	white-space: nowrap;
}

.kct-plan .kct-plan-photos:hover,
.kct-plan .kct-plan-photos:focus-visible {
	border-color: var(--kp-green);
	text-decoration: underline;
}

/* Radek, na ktery vede odkaz #akce-<id> (plan-table.js). */
.kct-plan .kct-plan-table tr.is-target > td {
	box-shadow: inset 0 0 0 9999px rgba(234, 179, 8, .18);
}

@media print {
	.kct-plan .kct-plan-photos {
		display: none !important;
	}
}

.kct-plan .kct-plan-c-type abbr {
	display: inline-block;
	min-width: 1.75em;
	margin: .05em .2em .05em 0;
	padding: .1em .3em;
	border: 0;
	border-radius: 6px;
	background: var(--kp-soft);
	color: var(--kp-green);
	font-size: .85em;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	cursor: help;
}

.kct-plan .kct-plan-c-type abbr:last-child {
	margin-right: 0;
}

/*
 * Barvy radku podle mesice (obrazovka): mesice se stridaji dvema odstiny (zeleny, piskovy), v mesici se stridaji radky
 * (zaklad / pruh). Bez filtru kazdy druhy mesic (tbody) a radek; s filtry (plan-table.js) jen viditelne – skript dava
 * mesici kp-malt a radku kp-alt. Pri razeni podle jineho sloupce (jedna skupina) jen pruhy radku.
 */
@media screen {
	.kct-plan .kct-plan-table tbody {
		--kp-r-base: var(--kp-bg);
		--kp-r-alt: var(--kp-stripe);
		--kp-r-hover: var(--kp-hover);
		--kp-r-month: var(--kp-soft);
	}

	.kct-plan:not(.is-filterable) .kct-plan-table tbody.kct-plan-month:nth-of-type(even),
	.kct-plan.is-filterable .kct-plan-table tbody.kp-malt {
		--kp-r-base: var(--kp-m2-bg);
		--kp-r-alt: var(--kp-m2-stripe);
		--kp-r-hover: var(--kp-m2-hover);
		--kp-r-month: var(--kp-m2-month);
	}
}

/* Pruhovany radek (viz pruhy nize): stitky typu bile, na svetle zelenem pruhu by splynuly. Tisk beze zmeny. */
@media screen {
	.kct-plan:not(.is-filterable) .kct-plan-table tbody > tr.kct-plan-row:nth-child(even) .kct-plan-c-type abbr,
	.kct-plan.is-filterable .kct-plan-table tbody > tr.kp-alt .kct-plan-c-type abbr {
		background: var(--kp-bg);
	}
}

/* Zrusene: preskrtnuty nazev + cerveny stitek. */
.kct-plan .is-canceled .kct-plan-name,
.kct-plan .is-canceled .kct-plan-note {
	color: var(--kp-muted);
	text-decoration-line: line-through;
	text-decoration-color: var(--kp-red);
	text-decoration-thickness: 1.5px;
}

/* Odkaz na vylet zustava zeleny i u minule akce (jinak by nebylo poznat, ze je to odkaz). */
.kct-plan .kct-plan-table tr.is-past a.kct-plan-name {
	color: var(--kp-green);
}

/* Zvyrazneni (zmena proti puvodnimu planu apod.): tucne. */
.kct-plan .is-highlight .kct-plan-name,
.kct-plan .is-highlight .kct-plan-note,
.kct-plan .is-highlight .kct-plan-when {
	font-weight: 800;
}

/* --- Paticka: pravidla a legenda --- */

.kct-plan .kct-plan-foot {
	margin: 1.1em 0 0;
	color: var(--kp-muted);
	font-size: .875em;
	line-height: 1.6;
	text-align: center;
}

.kct-plan .kct-plan-foot p {
	margin: 0;
}

.kct-plan .kct-plan-foot .kct-plan-rules {
	letter-spacing: .02em;
}

.kct-plan .kct-plan-foot .kct-plan-legend {
	display: inline-block;
	margin-top: .7em;
	padding: .35em .9em;
	border-radius: 999px;
	background: var(--kp-soft);
	color: var(--kp-ink);
}

/* ------------------------------------------------------------------ */
/* Obrazovka >= 720 px: tabulka                                        */
/* ------------------------------------------------------------------ */

@media screen and (min-width: 720px) {
	/* Uzky obsahovy sloupec (postranni panel): tabulka se zhusti; kdyby presto nestacila, posune se vodorovne. */
	.kct-plan {
		container-type: inline-size;
		overflow-x: auto;
	}

	.kct-plan .kct-plan-table {
		display: table;
		width: 100%;
		max-width: none;
		margin: 0;
		border: 1px solid var(--kp-line-strong);
		border-collapse: separate;
		border-spacing: 0;
		border-radius: var(--kp-radius);
		overflow: hidden;
		background: var(--kp-bg);
		color: var(--kp-ink);
		font-size: 1em;
		line-height: 1.4;
		table-layout: auto;
	}

	.kct-plan .kct-plan-table thead > tr,
	.kct-plan .kct-plan-table tbody > tr.kct-plan-row {
		background: transparent;
	}

	.kct-plan .kct-plan-table thead th {
		padding: .85em .6em;
		border: 0;
		background: var(--kp-green);
		color: #ffffff;
		font-size: .8em;
		font-weight: 700;
		line-height: 1.2;
		letter-spacing: .08em;
		text-align: left;
		text-transform: uppercase;
		vertical-align: bottom;
		white-space: nowrap;
	}

	.kct-plan .kct-plan-table thead th.kct-plan-c-month {
		width: 4.6em;
	}

	.kct-plan .kct-plan-table tbody td {
		padding: .6em .6em;
		border: 0;
		border-top: 1px solid var(--kp-line);
		background: var(--kp-r-base, transparent); /* odstin mesice */
		text-align: left;
		vertical-align: middle;
		transition: background-color .12s ease;
	}

	.kct-plan .kct-plan-table tbody:first-of-type > tr:first-child > td {
		border-top: 0;
	}

	/* Hranice mezi mesici – vyraznejsi linka jako v PDF. */
	.kct-plan .kct-plan-table tbody + tbody > tr:first-child > td,
	.kct-plan .kct-plan-table tbody + tbody > tr:first-child > th {
		border-top: 2px solid var(--kp-line-strong);
	}

	/* S filtry: prvni viditelny radek mesice (kp-start) a prvni viditelny mesic (kp-first) urcuje plan-table.js. */
	/* Bunka mesice: tbody > tr.kp-start > th.kct-plan-c-month, aby prebila jeji "border: 0" nize. */
	.kct-plan .kct-plan-table tr.kp-start > td,
	.kct-plan .kct-plan-table tbody > tr.kp-start > th.kct-plan-c-month {
		border-top: 2px solid var(--kp-line-strong);
	}

	.kct-plan .kct-plan-table tbody.kp-first > tr.kp-start > td,
	.kct-plan .kct-plan-table tbody.kp-first > tr.kp-start > th {
		border-top: 0;
	}

	/* Sloucena bunka mesice: velke cislo + nazev. */
	.kct-plan .kct-plan-table tbody th.kct-plan-c-month {
		width: 4.6em;
		padding: .8em .3em;
		border: 0;
		border-right: 1px solid var(--kp-line);
		background: var(--kp-r-month, var(--kp-soft)); /* odstin mesice */
		color: var(--kp-green);
		font-weight: 400;
		text-align: center;
		vertical-align: top;
	}

	.kct-plan .kct-plan-mnum {
		display: block;
		font-size: 1.75em;
		font-weight: 800;
		line-height: 1;
		letter-spacing: -.02em;
		font-variant-numeric: tabular-nums;
	}

	.kct-plan .kct-plan-mname {
		display: block;
		margin-top: .35em;
		color: var(--kp-green);
		font-size: .76em;
		font-weight: 700;
		line-height: 1.2;
		letter-spacing: .06em;
		text-transform: uppercase;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-day {
		width: 1%;
		color: var(--kp-muted);
		white-space: nowrap;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-date {
		width: 1%;
		font-weight: 600;
		white-space: nowrap;
		font-variant-numeric: tabular-nums;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-title {
		min-width: 10em;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-transport,
	.kct-plan .kct-plan-table td.kct-plan-c-type {
		width: 1%;
		white-space: nowrap;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-leader,
	.kct-plan .kct-plan-table td.kct-plan-c-transport,
	.kct-plan .kct-plan-table td.kct-plan-c-signup {
		color: var(--kp-ink);
	}

	/*
	 * Pruhy po radcich (prehlednost), odstin podle mesice (--kp-r-*, viz nahore). Bez filtru: kazdy druhy radek
	 * mesice. S filtry a razenim (plan-table.js, .is-filterable) jen viditelne radky – skript jim dava kp-alt
	 * (v mesici od zacatku, pri jinem razeni prubezne).
	 */
	.kct-plan:not(.is-filterable) .kct-plan-table tbody > tr.kct-plan-row:nth-child(even) > td,
	.kct-plan.is-filterable .kct-plan-table tbody > tr.kp-alt > td {
		background: var(--kp-r-alt, var(--kp-stripe));
	}

	/* Najeti mysi – zvyrazneni radku (i pruhovaneho: kazdy selektor o pseudotridu silnejsi nez pruh). */
	.kct-plan .kct-plan-table tbody > tr:hover > td,
	.kct-plan:not(.is-filterable) .kct-plan-table tbody > tr.kct-plan-row:nth-child(even):hover > td,
	.kct-plan.is-filterable .kct-plan-table tbody > tr.kp-alt:hover > td {
		background: var(--kp-r-hover, var(--kp-hover));
	}

	/* Minule akce: svetlejsi text bez pruhlednosti (zustava citelny), nazev bez tucneho pisma. */
	.kct-plan .kct-plan-table tr.is-past > td,
	.kct-plan .kct-plan-table tr.is-past .kct-plan-name,
	.kct-plan .kct-plan-table tr.is-past .kct-plan-note {
		color: var(--kp-past);
	}

	.kct-plan .kct-plan-table tr.is-past:not(.is-highlight) .kct-plan-name {
		font-weight: 400;
	}

	/* Zvyrazneni: tucne i den a datum. */
	.kct-plan .kct-plan-table tr.is-highlight > td.kct-plan-c-day,
	.kct-plan .kct-plan-table tr.is-highlight > td.kct-plan-c-date {
		font-weight: 800;
	}

	.kct-plan .kct-plan-table tr.is-highlight:not(.is-past) > td.kct-plan-c-day,
	.kct-plan .kct-plan-table tr.is-highlight:not(.is-past) > td.kct-plan-c-date {
		color: var(--kp-ink);
	}

	/* Uzky obsah na sirsi obrazovce: hustsi tabulka. */
	@container (max-width: 760px) {
		.kct-plan .kct-plan-table {
			font-size: .9375em;
		}

		.kct-plan .kct-plan-table thead th {
			padding: .8em .45em;
			letter-spacing: .04em;
		}

		.kct-plan .kct-plan-table tbody td {
			padding: .5em .45em;
		}

		.kct-plan .kct-plan-table thead th.kct-plan-c-month,
		.kct-plan .kct-plan-table tbody th.kct-plan-c-month {
			width: 3.6em;
		}

		.kct-plan .kct-plan-mnum {
			font-size: 1.5em;
		}

		.kct-plan .kct-plan-mname {
			font-size: .68em;
			letter-spacing: .02em;
		}

		.kct-plan .kct-plan-table td.kct-plan-c-title {
			min-width: 8em;
		}
	}
}

/* ------------------------------------------------------------------ */
/* Obrazovka < 720 px: karty                                           */
/* ------------------------------------------------------------------ */

@media screen and (max-width: 719.98px) {
	.kct-plan .kct-plan-tools {
		justify-content: stretch;
	}

	.kct-plan .kct-plan-head .kct-plan-tools {
		flex: 1 1 100%;
	}

	.kct-plan .kct-plan-tools .kct-plan-print,
	.kct-plan .kct-plan-tools .kct-plan-download {
		flex: 1 1 auto;
	}

	/* Filtry: hledani vzdy, ostatni po rozbaleni tlacitkem „Filtry a řazení“. */
	.kct-plan .kct-plan-filters {
		padding: .75em .8em;
	}

	.kct-plan .kct-plan-f-main {
		flex-wrap: nowrap;
		gap: .5em;
	}

	.kct-plan .kct-plan-f-search {
		flex: 1 1 auto;
	}

	.kct-plan .kct-plan-f-toggle {
		display: inline-flex;
		flex: 0 0 auto;
	}

	.kct-plan .kct-plan-f-panel:not(.is-open) {
		display: none;
	}

	.kct-plan .kct-plan-f-panel .kct-plan-f-field {
		flex: 1 1 calc(50% - .5em);
		min-width: 9em;
	}

	.kct-plan .kct-plan-f-types {
		flex: 1 1 100%;
	}

	.kct-plan .kct-plan-table,
	.kct-plan .kct-plan-table tbody,
	.kct-plan .kct-plan-table tr,
	.kct-plan .kct-plan-table td {
		display: block;
		width: auto;
	}

	.kct-plan .kct-plan-table {
		margin: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		font-size: 1em;
		line-height: 1.4;
	}

	.kct-plan .kct-plan-table thead,
	.kct-plan .kct-plan-table tbody th.kct-plan-c-month,
	.kct-plan .kct-plan-table td.kct-plan-c-day,
	.kct-plan .kct-plan-table td.kct-plan-c-date {
		display: none;
	}

	.kct-plan .kct-plan-table tbody {
		margin: 0 0 1.4em;
	}

	/* Nadpis skupiny = nazev mesice. */
	.kct-plan .kct-plan-table tbody::before {
		content: attr(data-month-name);
		display: block;
		margin: 0 0 .6em;
		padding: 0 0 .35em;
		border-bottom: 2px solid var(--kp-line-strong);
		color: var(--kp-green);
		font-size: 1.15em;
		font-weight: 800;
		line-height: 1.25;
	}

	/* Radek = karta. */
	.kct-plan .kct-plan-table tr.kct-plan-row {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		gap: .3em 1.1em;
		margin: 0 0 .6em;
		padding: .8em .95em .85em;
		border: 1px solid var(--kp-line);
		border-radius: var(--kp-radius);
		background: var(--kp-r-base, var(--kp-bg)); /* odstin mesice */
	}

	/* Pruhy: kazda druha karta podbarvena (stejna pravidla jako radky tabulky, odstin podle mesice). */
	.kct-plan:not(.is-filterable) .kct-plan-table tbody > tr.kct-plan-row:nth-child(even),
	.kct-plan.is-filterable .kct-plan-table tbody > tr.kct-plan-row.kp-alt {
		background: var(--kp-r-alt, var(--kp-stripe));
	}

	.kct-plan .kct-plan-table tr.kct-plan-row > td {
		margin: 0;
		padding: 0;
		border: 0;
		background: transparent;
		text-align: left;
	}

	.kct-plan .kct-plan-table tr.kct-plan-row > td:empty {
		display: none;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-title {
		flex: 1 1 100%;
		font-size: 1.02em;
		line-height: 1.35;
	}

	.kct-plan .kct-plan-when {
		display: block;
		margin: 0 0 .2em;
		color: var(--kp-green);
		font-size: .9em;
		font-weight: 700;
		font-variant-numeric: tabular-nums;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-leader,
	.kct-plan .kct-plan-table td.kct-plan-c-transport,
	.kct-plan .kct-plan-table td.kct-plan-c-type,
	.kct-plan .kct-plan-table td.kct-plan-c-signup {
		color: var(--kp-ink);
		font-size: .92em;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-leader::before,
	.kct-plan .kct-plan-table td.kct-plan-c-transport::before,
	.kct-plan .kct-plan-table td.kct-plan-c-type::before,
	.kct-plan .kct-plan-table td.kct-plan-c-signup::before {
		content: attr(data-label);
		margin-right: .4em;
		color: var(--kp-muted);
		font-size: .8em;
		font-weight: 700;
		letter-spacing: .05em;
		text-transform: uppercase;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-type abbr {
		font-size: .9em;
	}

	.kct-plan .kct-plan-table tr.is-past td,
	.kct-plan .kct-plan-table tr.is-past .kct-plan-name,
	.kct-plan .kct-plan-table tr.is-past .kct-plan-note,
	.kct-plan .kct-plan-table tr.is-past .kct-plan-when {
		color: var(--kp-past);
	}

	.kct-plan .kct-plan-table tr.is-past:not(.is-highlight) .kct-plan-name {
		font-weight: 400;
	}

	.kct-plan .kct-plan-table tr.is-highlight {
		border-color: var(--kp-line-strong);
	}

	.kct-plan .kct-plan-table tr.is-canceled .kct-plan-when {
		color: var(--kp-muted);
	}

	.kct-plan .kct-plan-foot {
		text-align: left;
	}
}

/* ------------------------------------------------------------------ */
/* Tisk: A4 na vysku jako PDF planu                                    */
/* ------------------------------------------------------------------ */

@media print {
	@page {
		size: A4 portrait;
		margin: 12mm;
	}

	html,
	body {
		background: #ffffff !important;
	}

	/*
	 * Tiskne se jen plan: zbytek stranky skryt, plan nahoru pres celou sirku.
	 * Skryva se jen na strance, kde tabulka je – plan.css se nacita i na strance editoru planu
	 * (kvuli nahledu tabulky) a ta se ma tisknout normalne. Prohlizece bez :has() to rozlisit
	 * neumi, tam se skryva vzdy (nahradni reseni s absolutni pozici planu).
	 */
	@supports not selector(:has(*)) {
		body * {
			visibility: hidden;
		}
	}

	@supports selector(:has(*)) {
		body:has(.kct-plan) * {
			visibility: hidden;
		}
	}

	/* "body" kvuli specificite: musi prebit body:has(.kct-plan) * vyse. */
	body .kct-plan,
	body .kct-plan * {
		visibility: visible;
	}

	.kct-plan {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		margin: 0;
		padding: 0;
		background: #ffffff;
		color: #000000;
		font-family: Calibri, Carlito, "Segoe UI", Arial, Helvetica, sans-serif;
		font-size: 9.5pt;
		line-height: 1.25;
	}

	/*
	 * Kde prohlizec umi :has(), zbytek stranky se z rozvrzeni uplne vyradi a plan zustane
	 * v beznem toku – nevznikaji prazdne stranky navic a tabulka se spolehlive deli na stranky
	 * (s opakovanou hlavickou).
	 */
	@supports selector(:has(*)) {
		body:has(.kct-plan) *:not(.kct-plan):not(.kct-plan *):not(:has(.kct-plan)) {
			display: none !important;
		}

		body:has(.kct-plan),
		body:has(.kct-plan) *:has(.kct-plan) {
			display: block !important;
			position: static !important;
			float: none !important;
			width: auto !important;
			min-width: 0 !important;
			max-width: none !important;
			height: auto !important;
			min-height: 0 !important;
			max-height: none !important;
			margin: 0 !important;
			padding: 0 !important;
			border: 0 !important;
			box-shadow: none !important;
			background: none !important;
			overflow: visible !important;
			transform: none !important;
			columns: auto !important;
		}

		.kct-plan {
			position: static;
		}
	}

	.kct-plan .kct-plan-head,
	.kct-plan .kct-plan-tools,
	.kct-plan .kct-plan-past,
	.kct-plan .kct-plan-filters,
	.kct-plan .kct-plan-sort-ico,
	.kct-plan .kct-plan-preview-bar,
	.kct-plan .kct-plan-when,
	.kct-plan .kct-plan-mname {
		display: none !important;
	}

	/*
	 * Vic planu na strance (2026 a 2027): tlacitko tisku vytiskne jen svuj plan (plan-table.js da
	 * html.kct-plan-print-one a planu .kct-plan-print-target), tisk z prohlizece vsechny – dalsi od nove stranky.
	 */
	html.kct-plan-print-one .kct-plan:not(.kct-plan-print-target) {
		display: none !important;
	}

	.kct-plan.kct-plan--next {
		break-before: page;
	}

	html.kct-plan-print-one .kct-plan.kct-plan--next {
		break-before: auto;
	}

	/* Tiskne se to, co je videt – nad tabulkou poznamka o vyberu (filtry, razeni). */
	.kct-plan .kct-plan-f-print {
		display: block;
		margin: 0 0 2mm;
		color: #000000;
		font-size: 8.5pt;
		text-align: center;
	}

	.kct-plan .kct-plan-f-empty {
		border: .5pt solid #000000;
		background: none;
		color: #000000;
	}

	.kct-plan .kct-plan-title {
		display: block;
		margin: 0 0 3mm;
		color: #000000;
		font-size: 14pt;
		font-weight: 700;
		line-height: 1.2;
		text-align: center;
	}

	.kct-plan .kct-plan-table {
		display: table;
		width: 100%;
		margin: 0;
		border: 1pt solid #000000;
		border-collapse: collapse;
		border-spacing: 0;
		border-radius: 0;
		background: #ffffff;
		color: #000000;
		font-size: 9.5pt;
		line-height: 1.25;
		table-layout: auto;
	}

	.kct-plan .kct-plan-table thead {
		display: table-header-group;
	}

	.kct-plan .kct-plan-table tbody {
		break-inside: auto;
		page-break-inside: auto;
	}

	.kct-plan .kct-plan-table thead > tr,
	.kct-plan .kct-plan-table tbody > tr.kct-plan-row {
		background: none !important;
		break-inside: avoid;
		page-break-inside: avoid;
	}

	.kct-plan .kct-plan-table th,
	.kct-plan .kct-plan-table td {
		padding: .5mm 1.3mm;
		border: .5pt solid #000000;
		background: none !important;
		color: #000000;
		text-align: left;
		vertical-align: middle;
		opacity: 1 !important;
	}

	.kct-plan .kct-plan-table thead th {
		padding: .8mm 1.3mm;
		font-size: 9pt;
		font-weight: 700;
		letter-spacing: 0;
		text-align: center;
		text-transform: uppercase;
		white-space: nowrap;
	}

	/* Silnejsi linka mezi mesici jako v PDF. */
	.kct-plan .kct-plan-table tbody + tbody > tr:first-child > td,
	.kct-plan .kct-plan-table tbody + tbody > tr:first-child > th,
	.kct-plan .kct-plan-table tr.kp-start > td,
	.kct-plan .kct-plan-table tr.kp-start > th {
		border-top: 1.5pt solid #000000;
	}

	.kct-plan .kct-plan-table tbody.kp-first > tr.kp-start > td,
	.kct-plan .kct-plan-table tbody.kp-first > tr.kp-start > th {
		border-top: .5pt solid #000000;
	}

	/* Hlavicky s tlacitkem razeni vypadaji v tisku jako text. */
	.kct-plan .kct-plan-sort {
		color: #000000;
		text-decoration: none;
	}

	.kct-plan .kct-plan-table thead th.kct-plan-c-month,
	.kct-plan .kct-plan-table tbody th.kct-plan-c-month {
		width: 5mm;
		padding: .5mm .3mm;
		text-align: center;
	}

	.kct-plan .kct-plan-table tbody th.kct-plan-c-month {
		border-right-width: 1pt;
	}

	/* Cislo mesice otocene o 90 stupnu jako v Excelu. */
	.kct-plan .kct-plan-mnum {
		display: inline-block;
		color: #000000;
		font-size: 9.5pt;
		font-weight: 700;
		line-height: 1;
		writing-mode: vertical-rl;
		transform: rotate(180deg);
	}

	.kct-plan .kct-plan-table td.kct-plan-c-day {
		width: 14mm;
		white-space: nowrap;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-date {
		width: 12mm;
		text-align: center;
		white-space: nowrap;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-leader {
		width: 20mm;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-transport {
		width: 14mm;
		white-space: nowrap;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-type {
		width: 9mm;
		white-space: nowrap;
	}

	.kct-plan .kct-plan-table td.kct-plan-c-signup {
		width: 27mm;
	}

	.kct-plan .kct-plan-table tr.is-highlight > td.kct-plan-c-day,
	.kct-plan .kct-plan-table tr.is-highlight > td.kct-plan-c-date,
	.kct-plan .is-highlight .kct-plan-name,
	.kct-plan .is-highlight .kct-plan-note {
		font-weight: 700;
	}

	.kct-plan .kct-plan-name,
	.kct-plan a.kct-plan-name,
	.kct-plan .kct-plan-note {
		color: #000000 !important;
		font-weight: 400;
	}

	.kct-plan a,
	.kct-plan a:link,
	.kct-plan a:visited {
		color: #000000 !important;
		text-decoration: none !important;
	}

	.kct-plan a::after,
	.kct-plan a[href]::after,
	.kct-plan abbr[title]::after {
		content: none !important;
	}

	.kct-plan .is-canceled .kct-plan-name,
	.kct-plan .is-canceled .kct-plan-note {
		text-decoration-line: line-through !important;
		text-decoration-color: #000000;
		text-decoration-thickness: .8pt;
	}

	.kct-plan .kct-plan-badge,
	.kct-plan .kct-plan-badge--unplanned {
		margin-left: 1mm;
		padding: 0 .8mm;
		border: .5pt solid #000000;
		border-radius: 0;
		background: none;
		color: #000000;
		font-size: 7pt;
		letter-spacing: .02em;
		vertical-align: baseline;
	}

	.kct-plan .kct-plan-c-type abbr {
		display: inline;
		min-width: 0;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: none;
		color: #000000;
		font-size: inherit;
		font-weight: 400;
		line-height: inherit;
		text-decoration: none;
	}

	.kct-plan .kct-plan-foot {
		margin: 3mm 0 0;
		color: #000000;
		font-size: 8pt;
		line-height: 1.35;
		text-align: center;
		break-inside: avoid;
		page-break-inside: avoid;
	}

	.kct-plan .kct-plan-foot .kct-plan-rules {
		letter-spacing: 0;
	}

	.kct-plan .kct-plan-foot .kct-plan-legend {
		display: block;
		margin: 0;
		padding: 0;
		border-radius: 0;
		background: none;
		color: #000000;
	}

	.kct-plan.kct-plan--empty > p:not(.kct-plan-preview-bar) {
		border: .5pt solid #000000;
		background: none;
		color: #000000;
	}
}
