/* -------------------------------------------------------------------------
 * Informacije o kupnji i pravne stranice - page-templates/legal.php
 *
 * Tekst za čitanje, ne za listanje: naslov, bočni popis svih šest stranica i
 * tijelo u čitljivoj širini. Ista pisma i tokeni kao ostatak stranice.
 * ---------------------------------------------------------------------- */

.zd-legal {
	max-width: var(--zd-container);
	margin: 0 auto;
	/* The header is absolute over the page, so the title starts under it. */
	padding: clamp(8rem, 12vw, 11rem) var(--zd-gutter) clamp(4rem, 7vw, 6.5rem);
}

.zd-legal__head {
	margin-bottom: clamp(2.5rem, 4.5vw, 4rem);
	padding-bottom: clamp(1.5rem, 2.5vw, 2.25rem);
	border-bottom: 1px solid var(--zd-rule);
}

.zd-legal__eyebrow {
	margin: 0 0 0.75rem;
	color: var(--zd-accent);
}

.zd-legal__title {
	margin: 0;
	font-family: var(--zd-font-display);
	font-weight: var(--zd-weight-display);
	font-size: var(--zd-size-h1);
	line-height: var(--zd-lh-display);
	letter-spacing: 0;
	text-transform: none;
	color: var(--zd-fg);
}

.zd-legal__body {
	display: grid;
	grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
	gap: clamp(2.5rem, 6vw, 6rem);
	align-items: start;
}

/* --- side list ---------------------------------------------------------- */

.zd-legal__nav {
	position: sticky;
	top: 7rem;
}

.zd-legal__nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
	border-left: 1px solid var(--zd-rule);
}

.zd-legal__nav li {
	margin: 0;
}

.zd-legal__nav a {
	display: block;
	margin-left: -1px;
	padding: 0.45rem 0 0.45rem 1.1rem;
	border-left: 1px solid transparent;
	font-size: var(--zd-size-small);
	line-height: 1.4;
	color: var(--zd-fg-muted);
	transition: color var(--zd-dur-fast) var(--zd-ease);
}

.zd-legal__nav a:hover {
	color: var(--zd-fg);
}

.zd-legal__nav .is-here a {
	border-left-color: var(--zd-accent);
	color: var(--zd-fg);
}

/* --- body text ---------------------------------------------------------- */

.zd-legal__text {
	max-width: var(--zd-measure);
	font-size: var(--zd-size-body);
	line-height: var(--zd-lh-body);
	color: var(--zd-fg);
}

.zd-legal__text > :first-child {
	margin-top: 0;
}

.zd-legal__text .zd-legal__lead {
	font-size: var(--zd-size-lead);
	line-height: 1.6;
}

.zd-legal__text h2 {
	margin: 2.75rem 0 0.75rem;
	font-family: var(--zd-font-display);
	font-weight: var(--zd-weight-display);
	font-size: var(--zd-size-h4);
	line-height: var(--zd-lh-heading);
	letter-spacing: 0;
	text-transform: none;
	color: var(--zd-fg);
}

.zd-legal__text h3 {
	margin: 1.75rem 0 0.5rem;
	font-family: var(--zd-font-body);
	font-weight: 500;
	font-size: var(--zd-size-body);
	letter-spacing: 0;
	text-transform: none;
	color: var(--zd-fg);
}

.zd-legal__text p,
.zd-legal__text li {
	margin: 0 0 1rem;
	line-height: var(--zd-lh-body);
	color: var(--zd-fg);
}

.zd-legal__text ul,
.zd-legal__text ol {
	margin: 0 0 1.25rem;
	padding-left: 1.25rem;
}

.zd-legal__text li {
	margin-bottom: 0.4rem;
}

.zd-legal__text a {
	color: var(--zd-accent);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.zd-legal__text a:hover {
	color: var(--zd-fg);
}

/* A form to copy (the withdrawal form) or a note set apart from the text. */
.zd-legal__text .zd-legal__box {
	margin: 1.5rem 0;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--zd-rule-strong);
	background: var(--zd-field-bg);
}

.zd-legal__text .zd-legal__box > :last-child {
	margin-bottom: 0;
}

/* --- Podaci o obrtu ----------------------------------------------------- */

.zd-legal__facts {
	display: grid;
	grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr);
	margin: 0 0 1.5rem;
	border-top: 1px solid var(--zd-rule);
}

.zd-legal__facts dt,
.zd-legal__facts dd {
	margin: 0;
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--zd-rule);
	line-height: 1.5;
}

.zd-legal__facts dt {
	padding-right: 1rem;
	font-size: var(--zd-size-small);
	color: var(--zd-fg-muted);
}

.zd-legal__facts dd {
	color: var(--zd-fg);
	/* IBAN and OIB are read back digit by digit. */
	font-variant-numeric: tabular-nums;
}

.zd-legal__updated {
	margin-top: 3rem !important;
	font-size: var(--zd-size-small);
	color: var(--zd-fg-muted) !important;
}

@media only screen and (max-width: 991px) {
	.zd-legal__body {
		grid-template-columns: minmax(0, 1fr);
	}

	/* On a narrow screen the list goes below the text: whoever opened the page
	   came for that page, the others are the "what next". */
	.zd-legal__nav {
		position: static;
		order: 2;
		padding-top: 2rem;
		border-top: 1px solid var(--zd-rule);
	}
}

@media only screen and (max-width: 600px) {
	.zd-legal__facts {
		grid-template-columns: minmax(0, 1fr);
	}

	.zd-legal__facts dt {
		padding-bottom: 0;
		border-bottom: 0;
	}

	.zd-legal__facts dd {
		padding-top: 0.15rem;
	}
}

/* --- tablica cijena (Dostava) ------------------------------------------- */

/* Tablica je šira od stupca teksta: izlazi iz mjere čitanja i, kad ni to
   nije dosta, kliže vodoravno unutar sebe - stranica nikad. */
.zd-legal__text .zd-legal__table {
	width: min(100%, 100vw - 2 * var(--zd-gutter));
	max-width: none;
	margin: 1.5rem 0 1rem;
	overflow-x: auto;
	border: 1px solid var(--zd-rule);
}

@media only screen and (min-width: 992px) {
	.zd-legal__text .zd-legal__table {
		width: calc(var(--zd-container) - 2 * var(--zd-gutter) - 16rem - clamp(2.5rem, 6vw, 6rem));
		max-width: calc(100vw - 2 * var(--zd-gutter) - 16rem - clamp(2.5rem, 6vw, 6rem));
	}
}

.zd-legal__table table {
	/* Nikad uže od sadržaja - inače se ljepljivi stupac država preklapa s
	   brojkama umjesto da tablica klizi. */
	width: max-content;
	min-width: 100%;
	border-collapse: collapse;
	font-size: var(--zd-size-small);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.zd-legal__table caption {
	padding: 0.75rem 1rem;
	caption-side: top;
	text-align: left;
	font-size: var(--zd-size-small);
	color: var(--zd-fg-muted);
	white-space: normal;
}

.zd-legal__table th,
.zd-legal__table td {
	padding: 0.45rem 0.75rem;
	border-top: 1px solid var(--zd-rule);
	text-align: right;
	line-height: 1.4;
}

.zd-legal__table thead th {
	font-weight: 500;
	color: var(--zd-fg-muted);
	background: var(--zd-field-bg);
}

.zd-legal__table th[scope="row"],
.zd-legal__table thead th:first-child {
	position: sticky;
	left: 0;
	text-align: left;
	font-weight: 400;
	background: var(--zd-bg);
}

.zd-legal__table thead th:first-child {
	background: var(--zd-bg-alt);
}

.zd-legal__table tbody tr:hover td,
.zd-legal__table tbody tr:hover th {
	background: var(--zd-bg-alt);
}

.zd-legal__text .zd-legal__small {
	font-size: var(--zd-size-small);
	color: var(--zd-fg-muted);
}
