/* Okienko „Prezenty na święta” na stronie głównej (inc/prezenty-okienko.php). Wygląd ze świątecznej sekcji sklepu:
   zieleń, lampki, śnieg z kropek, zaspa i Mikołaj na rowerze, dookoła ramka w paski jak laska cukrowa i zaokrąglone rogi
   (Kewin 30.11: „zmiękczyć te okno albo ubrać w ramkę”, wybrana wersja C). Komputer: okno na środku. Telefon: karta
   od dołu, odsunięta od krawędzi ekranu. */
.f36-prezenty {
	box-sizing: border-box;
	width: min(720px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100vh - 24px);
	max-height: calc(100dvh - 24px);
	margin: auto;
	padding: 0;
	overflow: auto;
	overscroll-behavior: contain;
	border: 12px solid transparent;
	border-radius: 26px;
	background:
		linear-gradient(#fff, #fff) 0 100% / 100% 16px no-repeat padding-box, /* pod zaspą: bez zielonej nitki w dolnych rogach */
		radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 0 1.6px, transparent 2.2px) padding-box,
		radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.13) 0 1.1px, transparent 1.6px) padding-box,
		radial-gradient(circle at 45% 85%, rgba(255, 255, 255, 0.16) 0 1.3px, transparent 1.9px) padding-box,
		linear-gradient(#0d4232, #0d4232) 0 0 / 100% calc(100% - 16px) no-repeat padding-box,
		repeating-linear-gradient(45deg, #d7263d 0 12px, #fff 12px 24px) border-box; /* paski widać tylko w ramce */
	background-size: 100% 16px, 90px 90px, 60px 60px, 130px 130px, 100% calc(100% - 16px), auto;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
	color: var(--f36-bialy);
}

.f36-prezenty[open] {
	animation: f36-prezenty-wejscie 0.28s ease-out;
}

.f36-prezenty::backdrop {
	background: rgba(0, 0, 0, 0.62);
}

@keyframes f36-prezenty-wejscie {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

.f36-prezenty-wnetrze {
	position: relative;
	box-sizing: border-box;
	overflow: hidden;
	padding: 52px 32px 122px;
}

.f36-prezenty-wnetrze::before { /* lampki */
	content: "";
	position: absolute;
	top: 8px;
	right: 0;
	left: 0;
	height: 26px;
	background:
		radial-gradient(circle at 14px 16px, #ff3d7f 0 5px, transparent 6px) 0 0 / 112px 26px repeat-x,
		radial-gradient(circle at 42px 18px, #c1ff72 0 5px, transparent 6px) 0 0 / 112px 26px repeat-x,
		radial-gradient(circle at 70px 16px, #ffd45c 0 5px, transparent 6px) 0 0 / 112px 26px repeat-x,
		radial-gradient(circle at 98px 18px, #fff 0 5px, transparent 6px) 0 0 / 112px 26px repeat-x,
		linear-gradient(rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.35)) 0 9px / 100% 1px no-repeat;
	filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.55));
}

.f36-prezenty-wnetrze::after { /* zaspa */
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 60px;
	background: radial-gradient(84px 40px at 60px 60px, #fff 98%, transparent) 0 0 / 120px 60px repeat-x;
	pointer-events: none;
}

.f36-prezenty-mikolaj {
	position: absolute;
	z-index: 1;
	bottom: 30px;
	left: 0;
	width: 84px;
	max-width: none;
	height: auto;
	pointer-events: none;
	animation: f36-prezenty-jazda 9s linear infinite;
}

@keyframes f36-prezenty-jazda {
	from { transform: translateX(-100px); }
	to { transform: translateX(740px); }
}

.f36-prezenty-tytul {
	margin: 0 48px 22px 0;
	font-family: var(--f36-anton);
	font-weight: 400;
	font-size: 44px;
	line-height: 1.15;
	text-transform: uppercase;
	color: var(--f36-bialy);
}

.f36-prezenty-tytul:focus {
	outline: none;
}

.f36-prezenty-dopisek {
	display: block;
	margin: 0 0 4px;
	font-family: var(--f36-pismo);
	font-weight: 700;
	font-size: 34px;
	line-height: 1;
	text-transform: none;
	color: var(--f36-roz-napis);
	transform: rotate(-4deg);
	transform-origin: left bottom;
}

.f36-prezenty-lista {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.f36-prezenty-karta {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border-radius: 12px;
	background: var(--f36-bialy);
	color: var(--f36-czarny);
	text-decoration: none;
}

.f36-prezenty-karta img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 7 / 5;
	object-fit: cover;
	background: var(--f36-paczka);
}

.f36-prezenty-tekst {
	flex: 1;
	padding: 14px 16px 12px;
}

.f36-prezenty-nazwa {
	display: block;
	font-weight: 700;
	font-size: 18px;
	line-height: 1.25;
}

.f36-prezenty-podpis {
	display: block;
	margin-top: 4px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--f36-szary);
}

.f36-prezenty-pasek {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 52px;
	padding: 0 16px;
	background: #d7263d;
	font-weight: 700;
	font-size: 16px;
	color: var(--f36-bialy);
	transition: background-color 0.2s ease;
}

.f36-prezenty-pasek b {
	font-family: var(--f36-anton);
	font-weight: 400;
	font-size: 22px;
	line-height: 1;
	white-space: nowrap;
}

@media (hover: hover) {
	.f36-prezenty-karta:hover .f36-prezenty-pasek {
		background: #b01c30;
	}

	.f36-prezenty-zamknij:hover {
		background: rgba(255, 255, 255, 0.16);
	}
}

.f36-prezenty-zamknij {
	position: absolute;
	z-index: 2;
	top: 40px;
	right: 16px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--f36-bialy);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.f36-prezenty a:focus-visible,
.f36-prezenty button:focus-visible {
	outline: 3px solid #ffd45c;
	outline-offset: 3px;
}

/* Niski ekran komputera (np. laptop): mniejsze odstępy, żeby okno mieściło się bez przewijania */
@media (min-width: 761px) and (max-height: 720px) {
	.f36-prezenty-wnetrze {
		padding: 42px 32px 84px;
	}

	.f36-prezenty-tytul {
		margin-bottom: 14px;
		font-size: 36px;
	}

	.f36-prezenty-dopisek {
		font-size: 28px;
	}

	.f36-prezenty-wnetrze::after {
		height: 44px;
	}

	.f36-prezenty-mikolaj {
		bottom: 20px;
		width: 60px;
	}
}

/* Telefon: karta od dołu, nie blokuje strony */
@media (max-width: 760px) {
	.f36-prezenty {
		position: fixed;
		z-index: 900;
		inset: auto 8px calc(8px + env(safe-area-inset-bottom, 0px));
		width: auto;
		max-height: 72vh;
		max-height: 72dvh;
		margin: 0;
		border-width: 8px;
		border-radius: 20px;
		box-shadow: 0 12px 44px rgba(0, 0, 0, 0.5);
	}

	.f36-prezenty-wnetrze {
		padding: 38px 16px 76px;
	}

	.f36-prezenty-wnetrze::after {
		height: 44px;
		background: radial-gradient(84px 30px at 60px 44px, #fff 98%, transparent) 0 0 / 120px 44px repeat-x;
	}

	.f36-prezenty-mikolaj {
		bottom: 20px;
		width: 52px;
		animation-duration: 6s;
	}

	.f36-prezenty-tytul {
		margin: 0 44px 10px 0;
		font-size: 28px;
	}

	.f36-prezenty-dopisek {
		margin-bottom: 0;
		font-size: 24px;
	}

	.f36-prezenty-zamknij {
		top: 34px;
		right: 8px;
	}

	.f36-prezenty-lista {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
	}

	/* Zdjęcie poza układem: wymiary z WordPressa (width i height w znaczniku img) rozpychałyby wiersz siatki. */
	.f36-prezenty-karta {
		position: relative;
		padding-left: 92px;
		border-radius: 10px;
	}

	.f36-prezenty-karta img {
		position: absolute;
		top: 0;
		left: 0;
		width: 92px;
		height: 100%;
		aspect-ratio: auto;
	}

	.f36-prezenty-tekst {
		padding: 7px 12px;
	}

	.f36-prezenty-nazwa {
		font-size: 15px;
		line-height: 1.2;
	}

	.f36-prezenty-podpis {
		display: none;
	}

	.f36-prezenty-pasek {
		min-height: 38px;
		padding: 0 12px;
		font-size: 15px;
	}

	.f36-prezenty-pasek b {
		font-size: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.f36-prezenty[open] {
		animation: none;
	}

	.f36-prezenty-mikolaj {
		left: 24px;
		animation: none;
	}

	.f36-prezenty-pasek,
	.f36-prezenty-zamknij {
		transition: none;
	}
}
