/* Zollfreilager-Vorteilsrechner – Farben und Schrift über die Variablen im Theme anpassbar */

/* Jost lokal eingebunden (SIL Open Font License), keine Verbindung zu Google */
@font-face {
	font-family: "ZFLR Jost";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/jost-latin-400-normal.woff2") format("woff2");
}

@font-face {
	font-family: "ZFLR Jost";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/jost-latin-500-normal.woff2") format("woff2");
}

@font-face {
	font-family: "ZFLR Jost";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("fonts/jost-latin-600-normal.woff2") format("woff2");
}

@font-face {
	font-family: "ZFLR Jost";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("fonts/jost-latin-700-normal.woff2") format("woff2");
}

.zflr {
	--zflr-bg-1: #0b1d4d;
	--zflr-bg-2: #16316c;
	--zflr-box: rgba(255, 255, 255, 0.45);
	--zflr-gold: #8b7b4b;
	--zflr-gold-line: #9d8752;
	--zflr-text: #ffffff;
	--zflr-text-soft: rgba(255, 255, 255, 0.88);
	--zflr-font: inherit;
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: none;
	margin: 0 0 2rem;
	padding: 32px 28px;
	background: linear-gradient(135deg, var(--zflr-bg-1) 0%, var(--zflr-bg-2) 55%, var(--zflr-bg-1) 100%);
	color: var(--zflr-text);
	font-family: var(--zflr-font);
}

.zflr *,
.zflr *::before,
.zflr *::after {
	box-sizing: border-box;
}

.zflr h2,
.zflr p,
.zflr dt,
.zflr dd,
.zflr label,
.zflr legend,
.zflr span {
	color: inherit;
	font-family: inherit;
}

.zflr .zflr__title {
	margin: 0 0 8px;
	font-size: clamp(28px, 3.4vw, 38px);
	font-weight: 400;
	line-height: 1.15;
}

.zflr .zflr__intro {
	margin: 0 0 26px;
	color: var(--zflr-text);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
}

.zflr .zflr__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

/* Weiße Kästchen */
.zflr .zflr__panel {
	border: 1px solid var(--zflr-box);
	padding: 30px 28px 34px;
}

.zflr .zflr__label {
	display: block;
	margin: 0 0 12px;
	padding: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

/* Metallauswahl */
.zflr .zflr__metals {
	min-width: 0;
	margin: 0 0 22px;
	padding: 0;
	border: 0;
}

.zflr .zflr__radios {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
}

.zflr .zflr__radio {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	cursor: pointer;
}

.zflr .zflr__radio input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.zflr .zflr__radio-mark {
	position: relative;
	flex: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
}

.zflr .zflr__radio input:checked + .zflr__radio-mark::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 3px;
	width: 5px;
	height: 9px;
	border: solid var(--zflr-gold);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.zflr .zflr__radio input:focus-visible + .zflr__radio-mark {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* Betrag: „CHF [ 29.000 ]“ wie im Abo-Rechner */
.zflr .zflr__amount {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 30px;
}

.zflr .zflr__unit {
	flex: none;
	font-size: 17px;
	font-weight: 600;
}

.zflr input.zflr__input {
	flex: 1;
	min-width: 0;
	height: 52px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--zflr-box);
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.04);
	box-shadow: none;
	color: #fff;
	font: inherit;
	font-size: 17px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.zflr input.zflr__input:focus {
	outline: none;
	border-color: #fff;
	box-shadow: 0 0 0 1px #fff;
}

/* Schieberegler */
.zflr input.zflr__range {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: 16px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.zflr input.zflr__range::-webkit-slider-runnable-track {
	height: 3px;
	border: 0;
	background: linear-gradient(to right, var(--zflr-gold) 0, var(--zflr-gold) var(--zflr-fill, 0%), #fff var(--zflr-fill, 0%), #fff 100%);
}

.zflr input.zflr__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	margin-top: -6.5px;
	border: 0;
	border-radius: 50%;
	background: var(--zflr-gold);
}

.zflr input.zflr__range::-moz-range-track {
	height: 3px;
	border: 0;
	background: #fff;
}

.zflr input.zflr__range::-moz-range-progress {
	height: 3px;
	background: var(--zflr-gold);
}

.zflr input.zflr__range::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border: 0;
	border-radius: 50%;
	background: var(--zflr-gold);
}

.zflr input.zflr__range:focus {
	outline: none;
}

.zflr input.zflr__range:focus-visible::-webkit-slider-thumb {
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
}

.zflr input.zflr__range:focus-visible::-moz-range-thumb {
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
}

.zflr .zflr__range-value {
	margin: 12px 0 0;
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

/* Ergebnis */
.zflr .zflr__savings {
	margin: 4px 0 26px;
	padding: 0 0 26px;
	border-bottom: 1px solid var(--zflr-gold-line);
	font-size: clamp(40px, 5vw, 56px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
}

.zflr .zflr__rows {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 24px;
	margin: 0;
	padding: 0;
}

/* Zeilen lösen sich ins Raster auf, damit alle Zahlen in einer Spalte stehen */
.zflr .zflr__row {
	display: contents;
}

.zflr .zflr__row[hidden] {
	display: none;
}

.zflr .zflr__row dt,
.zflr .zflr__row dd {
	padding: 8px 0;
	font-size: 15px;
	line-height: 1.4;
}

.zflr .zflr__row dt {
	margin: 0;
	color: var(--zflr-text);
	font-weight: 600;
}

.zflr .zflr__row dd {
	margin: 0;
	font-weight: 700;
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.zflr .zflr__note {
	margin: 20px 0 0;
	color: var(--zflr-text-soft);
	font-size: 13px;
	line-height: 1.5;
}

/* Mobil: untereinander */
@media (max-width: 782px) {
	.zflr {
		padding: 24px 16px;
	}

	.zflr .zflr__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.zflr .zflr__panel {
		padding: 24px 20px 28px;
	}

	.zflr .zflr__rows {
		column-gap: 16px;
	}

	.zflr .zflr__row dt,
	.zflr .zflr__row dd {
		font-size: 14px;
	}
}
