/* ==========================================================================
   Bezpieczny Pacjent — theme-base.css
   Zmienne kolorów (paleta brand), warstwa bazowa typografii, utility klasy
   pomocnicze oraz style widgetu dostępności WCAG — przeniesione 1:1
   z oryginalnego projektu Lovable (src/styles.css).
   Wartości kolorów w Customizerze (sekcja "Kolory marki") nadpisują te
   zmienne poprzez inline <style> wygenerowany w header.php
   (patrz: bp_print_customizer_css_vars()).
   ========================================================================== */

:root {
	--radius: 0.5rem;

	/* Paleta marki — wartości domyślne, nadpisywane przez Customizer */
	--navy: #0e2d5a;
	--navy-foreground: #ffffff;
	--brand-blue: #1a5fa8;
	--brand-sky: #eaf4fc;
	--safety: #2e9e6b;
	--safety-foreground: #ffffff;
	--orange: #f2711c;
	--orange-foreground: #ffffff;

	--background: #ffffff;
	--foreground: #191d29;

	--card: #ffffff;
	--card-foreground: #191d29;
	--popover: #ffffff;
	--popover-foreground: #191d29;

	--primary: var(--navy);
	--primary-foreground: #ffffff;
	--secondary: var(--brand-sky);
	--secondary-foreground: var(--navy);
	--muted: #f3f6fa;
	--muted-foreground: #64748b;
	--accent: var(--brand-sky);
	--accent-foreground: var(--navy);
	--destructive: #dc2626;
	--destructive-foreground: #ffffff;
	--border: #dde3ec;
	--input: #dde3ec;
	--ring: var(--brand-blue);
}

@layer base {
	* {
		border-color: var(--border);
	}

	html {
		scroll-behavior: smooth;
	}

	body {
		background-color: var(--background);
		color: var(--foreground);
		font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
		-webkit-font-smoothing: antialiased;
		text-rendering: optimizeLegibility;
	}

	h1,
	h2,
	h3,
	h4 {
		font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
		letter-spacing: -0.01em;
		color: var(--navy);
	}

	a {
		color: var(--brand-blue);
	}
	a:hover {
		color: var(--navy);
	}
}

/* Utility: kontener strony (odpowiednik @utility container-page z Tailwind v4) */
.container-page {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 1rem;
}

/* Subtelna animacja wjazdu przy scrollu */
.reveal {
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.reveal-in {
	opacity: 1;
	transform: none;
}

/* Widoczny fokus (dostępność) */
:focus-visible {
	outline: 2px solid var(--brand-blue);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ==== Widget dostępności (WCAG) — nakładki trybów ==== */
html.a11y-font-lg {
	font-size: 112.5%;
}
html.a11y-font-xl {
	font-size: 125%;
}

html.a11y-underline a {
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

html.a11y-motion *,
html.a11y-motion *::before,
html.a11y-motion *::after {
	animation-duration: 0.001ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.001ms !important;
	scroll-behavior: auto !important;
}

html.a11y-contrast,
html.a11y-contrast body {
	background: #000 !important;
	color: #ffed00 !important;
}
html.a11y-contrast * {
	background-color: transparent !important;
	color: #ffed00 !important;
	border-color: #ffed00 !important;
	box-shadow: none !important;
	text-shadow: none !important;
}
html.a11y-contrast a,
html.a11y-contrast a * {
	color: #ffffff !important;
	text-decoration: underline !important;
}
html.a11y-contrast img,
html.a11y-contrast svg,
html.a11y-contrast iframe {
	filter: grayscale(100%) contrast(1.1);
}
html.a11y-contrast button,
html.a11y-contrast input,
html.a11y-contrast textarea,
html.a11y-contrast select {
	background: #000 !important;
	color: #ffed00 !important;
	border: 1px solid #ffed00 !important;
}

html.a11y-grayscale {
	filter: grayscale(100%);
}

html.a11y-readable body,
html.a11y-readable * {
	font-family: Verdana, Arial, sans-serif !important;
	letter-spacing: 0.02em !important;
	word-spacing: 0.05em !important;
	line-height: 1.7 !important;
}

/* ==== Elementy bez odpowiednika w Tailwind utility (generowane dynamicznie) ==== */

/* Accordion (program konferencji) */
.bp-accordion-item {
	overflow: hidden;
	border-radius: 0.5rem;
	border: 1px solid var(--border);
	background: var(--card);
}
.bp-accordion-trigger {
	width: 100%;
	text-align: left;
	cursor: pointer;
	background: transparent;
	border: 0;
	padding: 1rem 1.5rem;
}
.bp-accordion-content {
	overflow: hidden;
	max-height: 0;
	transition: max-height 300ms ease;
}
.bp-accordion-item.is-open .bp-accordion-content {
	max-height: 2000px;
}
.bp-accordion-chevron {
	transition: transform 200ms ease;
}
.bp-accordion-item.is-open .bp-accordion-chevron {
	transform: rotate(180deg);
}

/* Tabs (dzień 1 / dzień 2) */
.bp-tabs-list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.25rem;
	background: var(--muted);
	padding: 0.25rem;
	border-radius: 0.5rem;
}
.bp-tab-trigger {
	padding: 0.5rem 1rem;
	border-radius: 0.375rem;
	font-size: 0.875rem;
	font-weight: 600;
	background: transparent;
	border: 0;
	cursor: pointer;
	color: var(--muted-foreground);
}
.bp-tab-trigger.is-active {
	background: var(--background);
	color: var(--navy);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.bp-tab-panel {
	display: none;
}
.bp-tab-panel.is-active {
	display: block;
}

/* Lightbox galerii */
.bp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.8);
	padding: 1rem;
}
.bp-lightbox.is-open {
	display: flex;
}

/* Toggle widgetu dostępności (switch) */
.bp-switch {
	position: relative;
	height: 1.5rem;
	width: 2.75rem;
	flex-shrink: 0;
	border-radius: 9999px;
	background: var(--muted);
	transition: background-color 150ms ease;
}
.bp-switch.is-on {
	background: var(--safety);
}
.bp-switch-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	height: 1.25rem;
	width: 1.25rem;
	border-radius: 9999px;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	transition: transform 150ms ease;
}
.bp-switch.is-on .bp-switch-thumb {
	transform: translateX(22px);
}

/* ==========================================================================
   Komponenty treści — do wklejania w standardowym edytorze WordPress
   (widok "Kod"/"Tekst") na zwykłych stronach (Program, Informacje,
   Prelegenci, Galeria, Abstrakt, Archiwum). To ZWYKŁY, ręcznie napisany CSS
   (nie generowany przez Tailwind) — działa niezależnie od tego, co znajduje
   się w treści strony w bazie danych, więc jest w pełni bezpieczny do
   swobodnej edycji przez użytkownika.
   ========================================================================== */

/* Mały nadtytuł sekcji (np. "SESJA I", "PRAKTYCZNE INFORMACJE") */
.bp-eyebrow {
	display: block;
	margin-bottom: 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: var(--brand-blue);
}

/* Siatka kart — dodaj modyfikator .bp-cards--2 lub .bp-cards--3 dla liczby kolumn na większych ekranach */
.bp-cards {
	display: grid;
	gap: 1.5rem;
	margin: 1.5rem 0;
}
@media (min-width: 640px) {
	.bp-cards--2 {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (min-width: 768px) {
	.bp-cards--3 {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Pojedyncza karta */
.bp-card {
	border: 1px solid var(--border);
	background: var(--card);
	border-radius: 0.5rem;
	padding: 1.5rem;
}
.bp-card > *:last-child {
	margin-bottom: 0;
}
.bp-card ul,
.bp-card ol {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
}
.bp-card li {
	margin-bottom: 0.5rem;
	line-height: 1.5;
}
.bp-card li:last-child {
	margin-bottom: 0;
}
.bp-card p {
	margin: 0 0 0.75rem;
	line-height: 1.6;
}
.bp-card p:last-child {
	margin-bottom: 0;
}

/* Mapa osadzona w karcie (np. "Miejsce konferencji") */
.bp-card__map {
	margin-top: 0.85rem;
	border: 1px solid var(--border);
	border-radius: 0.375rem;
	overflow: hidden;
}
.bp-card__map iframe {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	border: 0;
}
.bp-card__header {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}
.bp-card__icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.375rem;
	background: var(--brand-sky);
	color: var(--navy);
}
.bp-card__icon svg {
	width: 1.25rem;
	height: 1.25rem;
}
.bp-card__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--navy);
}

/* Wariant: pojedyncza, wyśrodkowana karta (np. strona Abstrakt) */
.bp-card--center {
	max-width: 32rem;
	margin: 1.5rem auto;
	text-align: center;
}
.bp-card--center .bp-card__header {
	flex-direction: column;
	justify-content: center;
}
.bp-card__icon--lg {
	width: 4rem;
	height: 4rem;
	border-radius: 0.75rem;
}
.bp-card__icon--lg svg {
	width: 2rem;
	height: 2rem;
}

/* Kolorowy boks informacyjny (np. "Materiały w przygotowaniu") */
.bp-callout {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	background: var(--brand-sky);
	border-radius: 0.5rem;
	padding: 1.25rem;
	margin: 1.5rem 0;
}
.bp-callout__icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.375rem;
	background: var(--navy);
	color: var(--navy-foreground);
}
.bp-callout__icon svg {
	width: 1.25rem;
	height: 1.25rem;
}
.bp-callout strong {
	display: block;
	color: var(--navy);
	margin-bottom: 0.25rem;
}
.bp-callout > *:last-child {
	margin-bottom: 0;
}

/* Mała odznaka/pigułka (np. "BEZPŁATNIE", "III EDYCJA") */
.bp-badge {
	display: inline-flex;
	align-items: center;
	border-radius: 0.375rem;
	background: var(--brand-sky);
	color: var(--navy);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 0.3rem 0.65rem;
}
.bp-badge--orange {
	background: var(--orange);
	color: var(--orange-foreground);
}

/* Granatowa "pigułka" z godziną, używana przed nagłówkiem sesji w Programie */
.bp-session-time {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: var(--navy);
	color: var(--navy-foreground);
	border-radius: 0.375rem;
	padding: 0.35rem 0.75rem;
	font-weight: 700;
	font-size: 0.875rem;
	margin-bottom: 0.5rem;
}
