/* ==========================================================================
   Business directory (katalog firm) in the portal look.
   Loaded only on directory pages (inc/catalog.php), where the plugin's own
   card stylesheet is dequeued. Tokens, rules and type come from style.css,
   so the three variants style the directory the same way as the articles.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Listing head (plugin markup re-labelled as .page-head)
   -------------------------------------------------------------------------- */
.wiz-hero .page-head__desc { margin-bottom: 0; }
.wiz-hero .page-head__desc strong { color: var(--ink); font-weight: 700; }
/* hub: the kicker would repeat the H1 ("Katalog firm") */
.post-type-archive-wizytowka .wiz-hero-nadtytul { display: none; }
.wiz-staty {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 22px;
	margin-top: 12px;
	font-size: 0.85rem;
	color: var(--ink-soft);
}
.wiz-stat strong {
	margin-right: 3px;
	font-family: var(--font-serif);
	font-size: 1.2rem;
	font-weight: 800;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Region index: name + number of firms, in columns with rules
   -------------------------------------------------------------------------- */
.dir-regions { margin-bottom: 36px; }
.dir-index {
	list-style: none;
	columns: 2;
	column-gap: 24px;
}
@media (min-width: 720px) {
	.dir-index { columns: 3; column-gap: 28px; }
}
.dir-index li { break-inside: avoid; border-top: 1px solid var(--rule); }
.dir-index a {
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 7px 0;
	font-size: 0.92rem;
	line-height: 1.35;
	color: var(--ink);
}
.dir-index__name { min-width: 0; }
.dir-index__count {
	margin-left: auto;
	flex: none;
	font-size: 0.76rem;
	color: var(--ink-soft);
	font-variant-numeric: tabular-nums;
}
.dir-index a:hover { color: var(--brand); }
.dir-index a:hover .dir-index__name { text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Firm list: directory entries in two ruled columns
   -------------------------------------------------------------------------- */
.dir-firms .block-head__page {
	margin-left: auto;
	font-size: 0.8rem;
	color: var(--ink-soft);
	white-space: nowrap;
}
.dir-list {
	display: grid;
	grid-template-columns: 1fr;
	column-gap: 32px;
}
@media (min-width: 720px) {
	.dir-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dir-entry {
	padding-block: 14px 16px;
	border-top: 1px solid var(--rule);
}
.dir-entry:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 720px) {
	.dir-entry:nth-child(2) { border-top: 0; padding-top: 0; }
}
.dir-entry__place { margin-bottom: 4px; }
.dir-entry__name { font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
/* the whole entry is the link's hit area; the real link stays in the name */
.dir-entry__name a::after { content: ""; position: absolute; inset: 0; }
.dir-entry:hover .dir-entry__name a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dir-entry__activity {
	margin-top: 6px;
	font-size: 0.9rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.dir-entry__meta { margin-top: 4px; }

/* pagination from the plugin (/strona/N/) in the theme's .pagination */
.wiz-paginacja .dots {
	min-width: 0;
	padding: 0 4px;
	border: 0;
	color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Sidebar box with the voivodeships
   -------------------------------------------------------------------------- */
.box--dir { background: var(--paper-alt); border-top-color: var(--brand); padding: 16px; }
.dir-index--aside { columns: 1; }
.aside .dir-index li { padding: 0; }
.aside .dir-index li:first-child { border-top: 0; }
.aside .dir-index a { padding: 6px 0; font-size: 0.88rem; }
.box__more {
	display: inline-block;
	margin-top: 10px;
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--brand);
}
.box__more::after { content: " \2192"; }
.box__more:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Firm page (plugin markup inside .entry-content; sections are .box)
   -------------------------------------------------------------------------- */
.single-wizytowka .article-title { font-size: clamp(1.6rem, 3.6vw, 2.3rem); line-height: 1.15; overflow-wrap: anywhere; }
.single-wizytowka .entry-content > * { max-width: none; }
.single-wizytowka .entry-content > .wiz-wstep { max-width: 72ch; }

.wiz-siatka {
	display: grid;
	grid-template-columns: 1fr;
	column-gap: 32px;
	margin-top: 8px;
}
@media (min-width: 720px) {
	.wiz-siatka { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.entry-content .wiz-karta { margin: 0 0 30px; font-size: 0.95rem; line-height: 1.6; }
.entry-content .wiz-karta .box__title {
	margin: 0 0 12px;
	font-family: var(--font-sans);
	font-size: 0.8rem;
	font-weight: 800;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ink);
}
.entry-content .wiz-karta > :last-child { margin-bottom: 0; }

/* registry data as label / value rows */
.entry-content .wiz-tabela {
	display: table;
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.95rem;
}
.entry-content .wiz-tabela th,
.entry-content .wiz-tabela td {
	padding: 8px 0;
	border: 0;
	border-top: 1px solid var(--rule);
	background: none;
	vertical-align: top;
}
.entry-content .wiz-tabela tr:first-child th,
.entry-content .wiz-tabela tr:first-child td { border-top: 0; padding-top: 0; }
.entry-content .wiz-tabela th {
	width: 44%;
	padding-right: 16px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ink-soft);
}
.entry-content .wiz-tabela td { font-variant-numeric: tabular-nums; }

.wiz-status {
	display: inline-block;
	padding: 2px 7px;
	border-radius: var(--radius);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.wiz-status-ok { color: #0b6b3a; background: #e6f3eb; }
.wiz-status-uwaga { color: #8a4b00; background: #fcefdc; }

.entry-content .wiz-adres { margin: 0 0 14px; line-height: 1.7; }
#wiz-mapa {
	height: 280px;
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	z-index: 0;
}
.entry-content .wiz-nota { margin: 6px 0 0; font-size: 0.78rem; color: var(--ink-soft); }

/* PKD: code column + description */
.entry-content .wiz-pkd { list-style: none; margin: 0; padding: 0; }
.entry-content .wiz-pkd li {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 0;
	padding: 8px 0;
	border-top: 1px solid var(--rule);
	line-height: 1.5;
}
.entry-content .wiz-pkd li:first-child { border-top: 0; padding-top: 0; }
.entry-content .wiz-pkd code {
	flex: 0 0 4.2rem;
	padding: 0;
	background: none;
	font-family: var(--font-sans);
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--ink-soft);
	font-variant-numeric: tabular-nums;
}
.entry-content .wiz-pkd-glowny { font-weight: 600; }
.wiz-znacznik {
	flex: none;
	padding: 1px 6px;
	border-radius: var(--radius);
	background: var(--color-primary-subtle);
	color: var(--brand);
	font-size: 0.66rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* the registry stores e-mail and www addresses in capitals */
.entry-content .wiz-kontakt { margin: 0; line-height: 1.9; text-transform: lowercase; overflow-wrap: anywhere; }
.wiz-etykieta {
	text-transform: none;
	display: inline-block;
	min-width: 5.5em;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ink-soft);
}

/* other firms in the same town */
.wiz-podobne { display: grid; grid-template-columns: 1fr; column-gap: 32px; }
@media (min-width: 720px) {
	.wiz-podobne { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wiz-podobne > .wiz-podobna:nth-child(2) { border-top: 0; padding-top: 0; }
}
.entry-content .wiz-podobna {
	display: block;
	padding: 9px 0;
	border-top: 1px solid var(--rule);
	color: var(--ink);
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
}
.entry-content .wiz-podobna:first-child { border-top: 0; padding-top: 0; }
.entry-content .wiz-podobna:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.entry-content .wiz-wiecej-wrap { margin: 12px 0 0; }
.entry-content .wiz-wiecej {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--brand);
	text-decoration: none;
}
.entry-content .wiz-wiecej::after { content: " \2192"; }
.entry-content .wiz-wiecej:hover { text-decoration: underline; }

.entry-content .wiz-zrodlo {
	margin: 0;
	padding-top: 12px;
	border-top: 1px solid var(--rule);
	font-size: 0.8rem;
	line-height: 1.55;
	color: var(--ink-soft);
}
