/**
 * Front-end styles for the [flk_szkolenia] shortcode.
 * Theme-agnostic: inherits fonts/colours, minimal opinionated styling.
 */

.flk-szk { --flk-gap: 24px; --flk-radius: 0px; --flk-border: rgba(0,0,0,.12); }
.flk-szk *, .flk-szk *::before, .flk-szk *::after { box-sizing: border-box; }

.flk-szk-empty { opacity: .7; font-style: italic; }

/* Month sections */
.flk-szk-month { margin: 0 0 40px; }
.flk-szk-month__title {
	margin: 0 0 18px;
	text-transform: uppercase;
	letter-spacing: .04em;
	font-size: clamp(1.1rem, 1rem + .6vw, 1.5rem);
}

/* Card grid — column counts driven by --flk-cols* (defaults 1/2/3 by breakpoint) */
.flk-szk-grid {
	display: grid;
	gap: var(--flk-gap);
	align-content: start; /* keep rows tight even if the container is taller (no vertical spread) */
	grid-template-columns: repeat(var(--flk-cols-mobile, 1), minmax(0, 1fr));
}
@media (min-width: 768px) {
	.flk-szk-grid { grid-template-columns: repeat(var(--flk-cols-tablet, 2), minmax(0, 1fr)); }
}
@media (min-width: 1025px) {
	.flk-szk-grid { grid-template-columns: repeat(var(--flk-cols, 3), minmax(0, 1fr)); }
}

/* Card */
.flk-szk-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--flk-border);
	border-radius: var(--flk-radius);
	overflow: hidden;
	background: rgba(255,255,255,.02);
}
.flk-szk-card__media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.flk-szk-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flk-szk-card__media.is-clickable { cursor: pointer; }
.flk-szk-card__badge {
	position: absolute; top: 12px; left: 12px;
	display: flex; flex-direction: column; align-items: center;
	min-width: 52px; padding: 6px 8px;
	background: rgba(0,0,0,.72); color: #fff; border-radius: 8px;
	line-height: 1;
}
.flk-szk-card__badge-day { font-size: 1.4rem; font-weight: 700; }
.flk-szk-card__badge-mon { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; }
.flk-szk-card__badge-year { font-size: .68rem; opacity: .85; margin-top: 2px; }

.flk-szk-card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px; flex: 1; }
.flk-szk-card__title { margin: 0; font-size: 1.05rem; line-height: 1.25; }
.flk-szk-card__title.is-clickable { cursor: pointer; }
.flk-szk-card__title.is-clickable:hover { text-decoration: underline; }
.flk-szk-card__meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .88rem; opacity: .85; }
.flk-szk-card__meta li { position: relative; }
.flk-szk-card__meta li + li::before { content: "•"; position: absolute; left: -9px; opacity: .5; }
.flk-szk-card__dateline { opacity: .75; }

.flk-szk-card__foot {
	margin-top: auto; padding-top: 12px;
	display: flex; flex-direction: column; gap: 12px;
}
.flk-szk-card__foot-row {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.flk-szk-card__seats { font-size: .8rem; opacity: .8; }
.flk-szk-card__btn {
	display: inline-block; padding: 9px 18px;
	border: 1px solid currentColor; border-radius: 999px;
	font-size: .85rem; font-weight: 600; text-decoration: none; line-height: 1;
	transition: opacity .15s ease;
}
.flk-szk-card__btn:hover { opacity: .7; }
.flk-szk-card__btn--ghost { visibility: hidden; } /* reserves the CTA slot for alignment */

/* "Sprawdź szczegóły" trigger (JS-only) */
.flk-szk-card__more {
	display: none; cursor: pointer; appearance: none; -webkit-appearance: none;
	background: none; border: 0; box-shadow: none; padding: 0; margin: 0; width: auto;
	font: inherit; font-size: .82rem; color: var(--flk-accent, inherit); text-decoration: underline;
}
.flk-szk-has-js .flk-szk-card__more { display: inline-block; }
/* Hover changes the font colour only (control: --flk-accent-hover) — never a
   background; default feedback is dropping the underline. */
.flk-szk-card__more:hover,
.flk-szk-card__more:focus {
	background: none; box-shadow: none;
	color: var(--flk-accent-hover, var(--flk-accent, inherit));
	text-decoration: none;
}
.flk-szk-card__details { display: none; }

/* Lightbox modal */
body.flk-szk-modal-open { overflow: hidden; }
.flk-szk-modal[hidden] { display: none; }
.flk-szk-modal {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center; padding: 20px;
}
.flk-szk-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.flk-szk-modal__dialog {
	position: relative; z-index: 1; width: 100%; max-width: 640px; max-height: 90vh; overflow: auto;
	background: #fff; color: #1a1a1a; border-radius: 10px; padding: 28px;
	box-shadow: 0 20px 60px rgba(0,0,0,.35);
	outline: none; /* dialog gets JS focus on open — no browser focus ring */
}
.flk-szk-modal__close {
	position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
	display: flex; align-items: center; justify-content: center;
	padding: 0; margin: 0; line-height: 0;
	background: var(--flk-modal-close-bg, rgba(0,0,0,.06));
	color: var(--flk-modal-close-color, var(--flk-accent, #1a1a1a));
	border: 0; border-radius: 50%; cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.flk-szk-modal__close svg { display: block; }
.flk-szk-modal__close:hover,
.flk-szk-modal__close:focus-visible {
	background: var(--flk-modal-close-bg-hover, rgba(0,0,0,.14));
	color: var(--flk-modal-close-color-hover, var(--flk-modal-close-color, var(--flk-accent, #1a1a1a)));
}
/* Cap the cover height so portrait images don't push the facts below the fold. */
.flk-szk-modal__cover {
	width: 100%; height: auto; max-height: min(40vh, 340px);
	object-fit: cover; object-position: center 30%;
	border-radius: 8px; margin: 0 0 18px; display: block;
}
/* Title sits above the cover; padding-right keeps long titles clear of the "X". */
.flk-szk-modal__title { margin: 0 0 16px; padding-right: 44px; font-size: 1.4rem; line-height: 1.25; }
/* Facts — one per line, label + value, so the data reads as a clear block. */
.flk-szk-modal__facts {
	list-style: none; margin: 0 0 20px; padding: 0;
	display: flex; flex-direction: column; gap: 8px; font-size: .92rem;
}
.flk-szk-modal__facts li { display: flex; gap: 10px; align-items: baseline; }
.flk-szk-modal__facts-label {
	flex: 0 0 auto; min-width: 110px;
	font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
	opacity: .55;
}
.flk-szk-modal__facts-value { flex: 1; }
.flk-szk-modal__desc { line-height: 1.6; }
.flk-szk-modal__desc :first-child { margin-top: 0; }
/* CTA sits between the facts and the description. */
.flk-szk-modal__cta { margin: 0 0 20px; }
@media (max-width: 480px) {
	.flk-szk-modal__facts li { flex-direction: column; gap: 2px; }
	.flk-szk-modal__facts-label { min-width: 0; }
}

/* Plain layout (layout="plain") — cards without a cover image; an accent date
   bar (ticket-style) replaces the image badge as the at-a-glance date. */
.flk-szk-card--plain { --flk-plain-bar-bg: var(--flk-accent, #1a1a1a); --flk-plain-bar-color: #fff; }
.flk-szk-card__datebar {
	display: flex; align-items: center; gap: 12px;
	padding: 12px 16px;
	background: var(--flk-plain-bar-bg); color: var(--flk-plain-bar-color);
	line-height: 1.1;
}
.flk-szk-card__datebar-day { font-size: 2rem; font-weight: 700; line-height: 1; }
.flk-szk-card__datebar-text { display: flex; flex-direction: column; gap: 2px; }
.flk-szk-card__datebar-month { font-weight: 600; font-size: .95rem; }
.flk-szk-card__datebar-weekday { font-size: .8rem; opacity: .85; }

/* List layout (layout="list") — rows with a big day number, milapro-style */
.flk-szk-list { display: flex; flex-direction: column; }
.flk-szk-row {
	display: flex; align-items: center; gap: 24px;
	padding: 18px 4px;
	border-top: 1px solid var(--flk-border);
}
.flk-szk-list .flk-szk-row:last-child { border-bottom: 1px solid var(--flk-border); }
.flk-szk-row__date { display: flex; align-items: center; gap: 14px; flex: 0 0 170px; }
.flk-szk-row__day { font-size: 2.8rem; font-weight: 700; line-height: 1; }
.flk-szk-row__datecol { display: flex; flex-direction: column; gap: 2px; }
.flk-szk-row__month { font-weight: 600; font-size: .9rem; }
.flk-szk-row__weekday { font-size: .85rem; opacity: .7; }
.flk-szk-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.flk-szk-row .flk-szk-card__title { margin: 0; }
.flk-szk-row__actions {
	flex: 0 0 auto;
	display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.flk-szk-row__actions-info { display: flex; align-items: center; gap: 14px; }
@media (max-width: 640px) {
	.flk-szk-row { flex-direction: column; align-items: flex-start; gap: 10px; }
	.flk-szk-row__date { flex-basis: auto; }
	.flk-szk-row__actions { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Calendar view */
.flk-szk-cal__nav { display: none; align-items: center; justify-content: center; gap: 24px; margin: 0 0 24px; }
.flk-szk--js .flk-szk-cal__nav { display: flex; }
.flk-szk-cal__label { text-transform: uppercase; letter-spacing: .04em; font-size: clamp(1.1rem, 1rem + .6vw, 1.5rem); min-width: 12ch; text-align: center; }
.flk-szk-cal__btn {
	cursor: pointer; width: 44px; height: 44px; line-height: 1;
	font-size: 1.6rem; background: none; border: 1px solid var(--flk-border); border-radius: 50%;
	color: inherit;
}
.flk-szk-cal__btn:disabled { opacity: .3; cursor: default; }
.flk-szk--js .flk-szk-cal__slide { display: none; }
.flk-szk--js .flk-szk-cal__slide.is-active { display: block; }
.flk-szk--calendar .flk-szk-cal__slide + .flk-szk-cal__slide { margin-top: 40px; }

/* Pagination */
.flk-szk-pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 32px 0 0; }
.flk-szk-pagination__link {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 10px;
	border: 1px solid var(--flk-border); border-radius: 8px;
	text-decoration: none; color: inherit; font-size: .9rem; line-height: 1;
	transition: opacity .15s ease;
}
.flk-szk-pagination__link:hover { opacity: .7; }
.flk-szk-pagination__link.is-current { font-weight: 700; border-color: currentColor; border-width: 2px; opacity: 1; }
.flk-szk-pagination__gap { display: inline-flex; align-items: flex-end; padding: 0 4px; opacity: .6; }
.flk-szk--loading { opacity: .5; pointer-events: none; transition: opacity .15s ease; }
