/* Terra Verde – Oferta. Kolory statusów jak na stronie: dostępny #516d0d, rezerwacja #1069ad, sprzedany #b33212. */
:root {
	--tv-wolny: #516d0d;
	--tv-rez: #1069ad;
	--tv-sprz: #b33212;
	--tv-tekst: #484040;
	--tv-tlo: #f7f4f1;
}

/* ------------------------------------------------ status */
.tv-status {
	display: inline-block;
	color: #fff;
	font-family: Poppins, system-ui, sans-serif;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: .02em;
	padding: 5px 12px;
	white-space: nowrap;
}
/* kolumny Kadence to flex w pionie — bez align-self znaczek rozciąga się na całą szerokość */
.tv-status--karta { align-self: flex-start; }
.tv-status--tabela { display: block; align-self: center; max-width: 90px; margin: 0 auto; text-align: center; }
.tv-status__cena { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; line-height: 1.2; color: #3a3333; text-align: center; white-space: nowrap; }
tr:has(.tv-status--dostepny) > * { background-color: rgba(81, 109, 13, .07) !important; }
.tv-status--dostepny { background: var(--tv-wolny); }
.tv-status--rezerwacja { background: var(--tv-rez); }
.tv-status--sprzedany { background: var(--tv-sprz); }

/* ------------------------------------------------ historia ceny */
.tv-historia__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
	align-self: flex-start;
}
.tv-historia__btn:hover, .tv-historia__btn:focus-visible { color: var(--tv-wolny); }
.tv-historia {
	width: min(760px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	padding: 28px 28px 20px;
	border: 0;
	border-radius: 4px;
	color: var(--tv-tekst);
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
	font-family: Poppins, system-ui, sans-serif;
}
.tv-historia::backdrop { background: rgba(20, 16, 16, .55); }
.tv-historia h3 { margin: 0 0 16px; font-family: "Playfair Display", Georgia, serif; font-size: 22px; font-weight: 500; }
.tv-historia__x { position: absolute; top: 8px; right: 10px; margin: 0; }
.tv-historia__x button { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--tv-tekst); padding: 4px 8px; }
.tv-historia__scroll { overflow-x: auto; }
.tv-historia table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tv-historia th, .tv-historia td { padding: 8px 10px; border-bottom: 1px solid #e7e1dc; text-align: left; vertical-align: top; }
.tv-historia th { font-weight: 600; background: var(--tv-tlo); }
.tv-historia__biezaca td { font-weight: 600; }
.tv-historia__nota { margin: 14px 0 0; font-size: 11px; opacity: .8; }
.tv-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------ tabela */
.tv-tabela-wrap { overflow-x: auto; }
.tv-tabela { width: 100%; border-collapse: collapse; font-family: Poppins, system-ui, sans-serif; font-size: 14px; color: var(--tv-tekst); }
.tv-tabela th, .tv-tabela td { padding: 12px 10px; border-bottom: 1px solid #e7e1dc; text-align: left; }
.tv-tabela thead th { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tv-tabela__nota { font-size: 11px; opacity: .8; margin-top: 8px; }

/* ------------------------------------------------ mapa */
.tv-mapa { margin: 0; }
.tv-mapa__canvas { position: relative; }
.tv-mapa__canvas img { display: block; width: 100%; height: auto; }
.tv-mapa__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tv-mapa__dom { cursor: pointer; outline: none; }
.tv-mapa__dom polygon {
	fill: transparent;
	stroke: transparent;
	stroke-width: 3;
	vector-effect: non-scaling-stroke;
	transition: fill .15s ease, stroke .15s ease;
}
.tv-mapa__nr {
	font: 600 64px/1 Poppins, system-ui, sans-serif;
	fill: #fff;
	text-anchor: middle;
	dominant-baseline: middle;
	paint-order: stroke;
	stroke: rgba(0, 0, 0, .35);
	stroke-width: 6px;
	pointer-events: none;
	opacity: 0;
	transition: opacity .15s ease;
}
/* dostępny → zielony, zarezerwowany/sprzedany → czerwony */
.tv-mapa__dom--dostepny:is(:hover, :focus-visible) polygon { fill: rgba(81, 109, 13, .5); stroke: var(--tv-wolny); }
.tv-mapa__dom--rezerwacja:is(:hover, :focus-visible) polygon,
.tv-mapa__dom--sprzedany:is(:hover, :focus-visible) polygon { fill: rgba(179, 50, 18, .5); stroke: var(--tv-sprz); }
.tv-mapa__dom:is(:hover, :focus-visible) .tv-mapa__nr { opacity: 1; }

/* ekrany dotykowe nie mają „najechania” — kolory i numery widoczne stale, delikatniej */
@media (hover: none) {
	.tv-mapa__dom--dostepny polygon { fill: rgba(81, 109, 13, .32); stroke: var(--tv-wolny); }
	.tv-mapa__dom--rezerwacja polygon,
	.tv-mapa__dom--sprzedany polygon { fill: rgba(179, 50, 18, .32); stroke: var(--tv-sprz); }
	.tv-mapa__nr { opacity: 1; }
}

.tv-mapa__tip {
	position: absolute;
	z-index: 5;
	min-width: 170px;
	padding: 10px 12px;
	border-radius: 3px;
	background: #fff;
	color: var(--tv-tekst);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
	font: 13px/1.4 Poppins, system-ui, sans-serif;
	pointer-events: none;
	transform: translate(-50%, calc(-100% - 14px));
	white-space: nowrap;
}
.tv-mapa__tip strong { display: block; font-size: 14px; }
.tv-mapa__tip .tv-status { margin: 4px 0; }

.tv-mapa__legenda {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	align-items: center;
	margin-top: 12px;
	font: 12px/1.4 Poppins, system-ui, sans-serif;
	color: var(--tv-tekst);
}
.tv-leg::before {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 6px;
	vertical-align: -1px;
	border-radius: 2px;
}
.tv-leg--wolny::before { background: var(--tv-wolny); }
.tv-leg--zajety::before { background: var(--tv-sprz); }
.tv-leg__hint { opacity: .7; margin-left: auto; }
@media (max-width: 600px) { .tv-leg__hint { margin-left: 0; width: 100%; } }

/* ------------------------------------------------ przypisy w treści */
.tv-przypis { display: block; margin-top: 3px; font-size: 11px; line-height: 1.3; opacity: .85; }
