/* OSP – Kalendarz wpisów z Facebooka. Colours/fonts follow the child theme's tokens (--osp-*),
 * with the same values as fallbacks when the plugin runs without the theme. */
.osp-fbc {
	--osp-fbc-accent: var(--osp-red, #C8102E);
	--osp-fbc-navy: var(--osp-graphite, #2A2C30);
	--osp-fbc-ink: var(--osp-graphite, #2A2C30);
	--osp-fbc-muted: var(--osp-graphite-2, #55585F);
	--osp-fbc-soft: var(--osp-plaster, #F4F5F6);
	--osp-fbc-line: var(--osp-line, #DFE1E4);
	--osp-fbc-radius: var(--osp-radius, 3px);
	color: var(--osp-fbc-ink);
	max-width: 1100px;
	margin: 0 auto;
}
.osp-fbc *,
.osp-fbc *::before,
.osp-fbc *::after { box-sizing: border-box; }
.osp-fbc [hidden] { display: none !important; }

.osp-fbc__sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Month header: ‹ LISTOPAD 2026 › */
.osp-fbc__month + .osp-fbc__month { margin-top: 56px; }
.osp-fbc.is-js .osp-fbc__month + .osp-fbc__month,
.osp-fbc-js .osp-fbc .osp-fbc__month + .osp-fbc__month { margin-top: 0; }
/* JS on, calendar.js not run yet (deferred): same layout as after it runs — no jump. */
.osp-fbc-js .osp-fbc:not(.is-js) .osp-fbc__month:not(.osp-fbc__month--active) { display: none; }
.osp-fbc-js .osp-fbc:not(.is-js) .osp-fbc__nav[hidden] { display: inline-flex !important; }
.osp-fbc__head {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
}
.osp-fbc .osp-fbc__title {
	margin: 0 !important;
	padding: 0;
	font-size: clamp(1.6rem, 5vw, 2.6rem) !important;
	line-height: 1.1;
	font-weight: 700;
	color: var(--osp-fbc-ink);
}
.osp-fbc__title:focus { outline: none; }
.osp-fbc__title:focus-visible { outline: 3px solid var(--osp-fbc-accent); outline-offset: 4px; }
.osp-fbc__nav {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--osp-fbc-line);
	border-radius: 50%;
	background: #fff;
	color: var(--osp-fbc-ink);
	cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s;
}
.osp-fbc__nav:hover:not(:disabled) { background: var(--osp-fbc-accent); border-color: var(--osp-fbc-accent); color: #fff; }
.osp-fbc__nav:focus-visible { outline: 3px solid var(--osp-fbc-accent); outline-offset: 2px; }
.osp-fbc__nav:disabled { opacity: .3; cursor: default; }
.osp-fbc__next { order: 3; }
.osp-fbc__title { order: 2; flex: 1; text-align: center; }
.osp-fbc__prev { order: 1; }

/* Layout: calendar | cards */
.osp-fbc__body {
	display: grid;
	grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}
@media (max-width: 880px) {
	.osp-fbc__body { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.osp-fbc__calendar { max-width: 440px; width: 100%; margin: 0 auto; }
}

/* Calendar grid */
.osp-fbc__table {
	width: calc(100% + 10px);
	margin: -5px -5px 0 !important;
	border: 0 !important;
	border-collapse: separate !important;
	border-spacing: 5px;
	table-layout: fixed;
	background: none !important;
}
.osp-fbc__table th,
.osp-fbc__table td {
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	text-align: center;
	vertical-align: middle;
}
.osp-fbc__table th {
	padding-bottom: 6px !important;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--osp-fbc-muted);
}
.osp-fbc__table th:nth-child(n+6) { color: var(--osp-fbc-accent); }
.osp-fbc .osp-fbc__table abbr[title] { text-decoration: none !important; border: 0 !important; cursor: default; }

.osp-fbc__cell {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	border-radius: var(--osp-fbc-radius);
	font-size: .95rem;
	font-variant-numeric: tabular-nums;
	color: var(--osp-fbc-muted);
	background: var(--osp-fbc-soft);
}
.osp-fbc__day.is-today .osp-fbc__cell { box-shadow: inset 0 0 0 2px var(--osp-fbc-accent); color: var(--osp-fbc-accent); font-weight: 700; }

/* Day with a post: photo tile (or solid graphite when there is no picture) */
.osp-fbc a.osp-fbc__link {
	overflow: hidden;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
	background-color: var(--osp-fbc-navy);
	background-size: cover;
	background-position: center;
	transition: transform .18s ease, box-shadow .18s ease;
}
.osp-fbc__link.has-thumb::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, .1) 70%);
	transition: background .18s;
}
.osp-fbc__num { position: relative; font-size: 1rem; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.osp-fbc__count {
	position: absolute;
	top: 3px;
	right: 3px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 9px;
	background: #fff;
	color: var(--osp-fbc-accent);
	font-size: 10px;
	line-height: 17px;
	font-weight: 800;
}
.osp-fbc a.osp-fbc__link:hover,
.osp-fbc a.osp-fbc__link:focus-visible,
.osp-fbc .is-linked a.osp-fbc__link {
	z-index: 1;
	transform: scale(1.08);
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--osp-fbc-accent);
	outline: none;
}
.osp-fbc a.osp-fbc__link:hover::before,
.osp-fbc a.osp-fbc__link:focus-visible::before,
.osp-fbc .is-linked a.osp-fbc__link::before { background: linear-gradient(to top, rgba(200, 16, 46, .75), rgba(0, 0, 0, 0) 75%); }
.osp-fbc__day.is-today a.osp-fbc__link { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--osp-fbc-accent); }

.osp-fbc__legend {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 14px 0 0 !important;
	font-size: .82rem;
	line-height: 1.4;
	color: var(--osp-fbc-muted);
}
.osp-fbc__swatch {
	flex: none;
	width: 14px;
	height: 14px;
	border-radius: 2px;
	background: var(--osp-fbc-navy);
}

/* Posts of the month */
.osp-fbc__subtitle {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px !important;
	padding: 0;
	font-size: 1.35rem !important;
	font-weight: 600;
	color: var(--osp-fbc-ink);
}
.osp-fbc__badge {
	display: inline-block;
	min-width: 22px;
	padding: 2px 7px;
	border-radius: var(--osp-fbc-radius);
	background: var(--osp-fbc-navy);
	color: #fff;
	font-family: var(--osp-font, inherit);
	font-size: .8rem;
	text-align: center;
	letter-spacing: 0;
}
.osp-fbc__empty {
	margin: 0 !important;
	padding: 28px 24px;
	border: 2px dashed var(--osp-fbc-line);
	border-radius: var(--osp-fbc-radius);
	color: var(--osp-fbc-muted);
	text-align: center;
}
.osp-fbc__cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 20px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}
.osp-fbc__card { margin: 0 !important; padding: 0 !important; }
.osp-fbc__card::before { display: none !important; }
.osp-fbc a.osp-fbc__card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--osp-fbc-line);
	border-radius: var(--osp-fbc-radius);
	background: #fff;
	color: var(--osp-fbc-ink) !important;
	text-decoration: none !important;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.osp-fbc a.osp-fbc__card-link:hover,
.osp-fbc a.osp-fbc__card-link:focus-visible,
.osp-fbc .is-linked > a.osp-fbc__card-link {
	border-color: var(--osp-fbc-accent);
	box-shadow: 0 0 0 1px var(--osp-fbc-accent);
	outline: none;
}
.osp-fbc a.osp-fbc__card-link:focus-visible {
	box-shadow: 0 0 0 3px var(--osp-yellow, #F2B705), 0 0 0 6px var(--osp-fbc-navy);
}
.osp-fbc__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--osp-fbc-soft);
}
.osp-fbc .osp-fbc__img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	transition: transform .4s ease;
}
.osp-fbc__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--osp-fbc-muted);
}
.osp-fbc__placeholder .osp-fbc__fb { width: 44px; height: 44px; }
.osp-fbc__date {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 8px;
	border-radius: var(--osp-fbc-radius);
	background: var(--osp-fbc-navy);
	color: #fff;
	font-size: .8rem;
	font-weight: 600;
	line-height: 1.3;
}
.osp-fbc__card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 14px 16px 16px;
}
.osp-fbc__card-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	font-family: var(--osp-font-display, inherit);
	font-size: 1.2rem;
	font-weight: 600;
	line-height: 1.2;
}
.osp-fbc__cta {
	margin-top: auto;
	font-size: .9rem;
	font-weight: 600;
	color: var(--osp-fbc-accent);
}

/* "Wszystkie wpisy na Facebooku" – same look as the theme's buttons */
.osp-fbc__more { margin: 44px 0 0 !important; text-align: center; }
.osp-fbc a.osp-fbc__button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 12px 24px;
	border-radius: var(--osp-fbc-radius);
	background: var(--osp-fbc-navy);
	color: #fff !important;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none !important;
	transition: background-color .2s;
}
.osp-fbc a.osp-fbc__button:hover,
.osp-fbc a.osp-fbc__button:focus-visible { background: var(--osp-fbc-accent); }
.osp-fbc a.osp-fbc__button:focus-visible { outline: 3px solid var(--osp-yellow, #F2B705); outline-offset: 0; box-shadow: 0 0 0 6px var(--osp-fbc-navy); }

/* Phones: compact cards (photo left, text right) so a busy month is not a very long scroll */
@media (max-width: 540px) {
	.osp-fbc__table { border-spacing: 3px; width: calc(100% + 6px); margin: -3px -3px 0 !important; }
	.osp-fbc__cell { border-radius: 7px; font-size: .85rem; }
	.osp-fbc__cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.osp-fbc a.osp-fbc__card-link { flex-direction: row; }
	.osp-fbc__media { flex: none; width: 112px; aspect-ratio: auto; min-height: 104px; }
	.osp-fbc__placeholder .osp-fbc__fb { width: 32px; height: 32px; }
	.osp-fbc__date { top: auto; bottom: 8px; left: 8px; padding: 3px 8px; font-size: .7rem; }
	.osp-fbc__card-body { gap: 6px; padding: 12px 14px; }
	.osp-fbc__card-title { font-size: .92rem; }
	.osp-fbc a.osp-fbc__card-link:hover,
	.osp-fbc .is-linked > a.osp-fbc__card-link { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.osp-fbc *,
	.osp-fbc *::before { transition: none !important; }
	.osp-fbc a.osp-fbc__link:hover,
	.osp-fbc .is-linked a.osp-fbc__link,
	.osp-fbc a.osp-fbc__card-link:hover,
	.osp-fbc .is-linked > a.osp-fbc__card-link,
	.osp-fbc a.osp-fbc__card-link:hover .osp-fbc__img { transform: none; }
}

/* ---------------------------------------------------------------------------
 * [osp_kalendarz_fb_najnowsze] – latest posts row (homepage)
 * Colours/fonts follow the child theme's tokens when present.
 */
.osp-fbl {
	padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.osp-fbl .osp-fbl__inner {
	box-sizing: border-box;
	max-width: calc(var(--osp-wide, 74rem) + 2 * var(--osp-gutter, 1.25rem));
	margin: 0 auto;
	padding: 0 var(--osp-gutter, 1.25rem);
}

.osp-fbl__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	margin-bottom: 1.75rem;
}

#content .osp-fbl__title,
.osp-fbl__title {
	margin: 0;
}

#content .osp-fbl__more,
.osp-fbl__more {
	font-weight: 600;
	color: var(--osp-red, #C8102E);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.osp-fbl__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--osp-gap, 1.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.osp-fbl__item {
	margin: 0;
	padding: 0;
}

.osp-fbl__item::before {
	content: none;
}

#content .osp-fbl__link,
.osp-fbl__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: var(--osp-graphite, #2A2C30);
	text-decoration: none !important;
}

.osp-fbl__media {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--osp-plaster, #F4F5F6);
}

.osp-fbl__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.osp-fbl__placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--osp-graphite-2, #55585F);
}

.osp-fbl__placeholder svg {
	width: 40px;
	height: 40px;
}

.osp-fbl__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.9rem;
	font-size: 0.9375rem;
	color: var(--osp-graphite-2, #55585F);
}

.osp-fbl__meta svg {
	flex: none;
	color: var(--osp-graphite-2, #55585F);
}

.osp-fbl__name {
	margin-top: 0.3rem;
	font-family: var(--osp-font-display, inherit);
	font-size: 1.375rem;
	font-weight: 600;
	line-height: 1.2;
}

.osp-fbl__link:hover .osp-fbl__name,
.osp-fbl__link:focus-visible .osp-fbl__name {
	color: var(--osp-red, #C8102E);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.15em;
}

@media (max-width: 900px) {
	.osp-fbl__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.osp-fbl__list {
		grid-template-columns: 1fr;
	}
}
