/* Auto Granzer - Fahrzeugliste
   Ergaenzt main.css. Die Seite ist HELL: Grund #dbeaf7 (Hellblau),
   Flaechen #ffffff, Schrift #1f2a44, Akzent #1667a8 / #0d4d80.

   Die Tiefe entsteht ueber drei Stufen: Karten und Popup liegen als
   weisse Flaechen ueber dem blauen Grund, Bildflaechen eine Stufe
   darunter (#e8f1f9). Bedienelemente, die auf einem FOTO liegen
   (Bildzaehler), bleiben dunkel - auf hellen Bildern waere helle
   Schrift sonst nicht zu lesen. */

/* -------------------------------------------------------------- Toolbar -- */

.fz-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	justify-content: space-between;
	align-items: center;
	margin: 2em 0 2.5em 0;
	padding-bottom: 1.5em;
	border-bottom: solid 1px rgba(31, 42, 68, 0.15);
}

.fz-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.fz-tab {
	appearance: none;
	-webkit-appearance: none;
	background-color: transparent;
	border: solid 2px rgba(31, 42, 68, 0.3);
	border-radius: 4px;
	color: #1f2a44;
	cursor: pointer;
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.15em;
	line-height: 1;
	padding: 0.9em 1.4em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.fz-tab span {
	opacity: 0.6;
	font-weight: 400;
	margin-left: 0.5em;
}

.fz-tab:hover {
	border-color: #1667a8;
	color: #1667a8;
}

.fz-tab.is-active {
	background-color: #1667a8;
	border-color: #1667a8;
	color: #ffffff;
}

.fz-tab.is-active span {
	opacity: 0.75;
}

.fz-tab.is-active:hover {
	background-color: #0d4d80;
	border-color: #0d4d80;
	color: #ffffff;
}

.fz-tools {
	display: flex;
	gap: 0.75em;
	flex-wrap: wrap;
}

.fz-tools input[type="search"],
.fz-tools select {
	min-width: 12em;
	height: 2.9em;
	margin: 0;
	color: #1f2a44;
}

/* main.css blendet den Platzhalter stark ab (mit !important) - "Marke, Modell
   ..." ist damit kaum zu lesen, deshalb hier volle Schriftfarbe */
.fz-tools input[type="search"]::placeholder {
	color: #1f2a44 !important;
	opacity: 1;
}

.fz-tools input[type="search"]::-webkit-input-placeholder {
	color: #1f2a44 !important;
	opacity: 1;
}

.fz-tools input[type="search"]::-moz-placeholder {
	color: #1f2a44 !important;
	opacity: 1;
}

.fz-tools input[type="search"]:-ms-input-placeholder {
	color: #1f2a44 !important;
	opacity: 1;
}

/* ---------------------------------------------------------------- Grid -- */

.fz-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.75em;
}

.fz-card {
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	border: solid 1px rgba(31, 42, 68, 0.15);
	border-radius: 5px;
	cursor: pointer;
	overflow: hidden;
	text-align: left;
	padding: 0;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.fz-card:hover,
.fz-card:focus {
	border-color: #1667a8;
	box-shadow: 0 10px 28px rgba(31, 42, 68, 0.18);
	transform: translateY(-3px);
	outline: none;
}

.fz-card-media {
	position: relative;
	background-color: #e8f1f9;
	padding-top: 66%;
	overflow: hidden;
}

.fz-card-media img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fz-card-media .fz-noimage {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	text-align: center;
	color: rgba(31, 42, 68, 0.35);
	font-size: 0.8em;
	letter-spacing: 0.15em;
	text-transform: uppercase;
}

.fz-card-body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 1.25em 1.35em 1.35em 1.35em;
}

.fz-card-title {
	font-size: 0.95em;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 0.4em 0;
	color: #1f2a44;
}

.fz-card-sub {
	font-size: 0.8em;
	color: rgba(31, 42, 68, 0.6);
	margin: 0 0 1em 0;
	line-height: 1.5;
}

.fz-card-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em 1.1em;
	font-size: 0.78em;
	color: rgba(31, 42, 68, 0.75);
	margin-bottom: 1.1em;
}

.fz-card-facts span {
	white-space: nowrap;
}

.fz-card-price {
	margin-top: auto;
	font-size: 1.15em;
	font-weight: 700;
	color: #1667a8;
}

.fz-stand,
.fz-empty {
	margin-top: 2.5em;
	font-size: 0.8em;
	color: rgba(31, 42, 68, 0.6);
}

/* --------------------------------------------------------------- Modal -- */

.fz-modal {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5em;
}

.fz-modal[hidden] {
	display: none;
}

.fz-modal-backdrop {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-color: rgba(31, 42, 68, 0.55);
}

.fz-modal-box {
	position: relative;
	background-color: #ffffff;
	border: solid 1px rgba(31, 42, 68, 0.15);
	border-radius: 6px;
	max-width: 780px;
	width: 100%;
	max-height: 92vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(31, 42, 68, 0.30);
}

.fz-modal-close {
	position: absolute;
	top: 0.6em;
	right: 0.6em;
	z-index: 3;
	appearance: none;
	-webkit-appearance: none;
	background-color: rgba(255, 255, 255, 0.92);
	border: solid 1px rgba(31, 42, 68, 0.25);
	border-radius: 50%;
	width: 1.9em;
	height: 1.9em;
	font-size: 1.4em;
	line-height: 1;
	color: #1f2a44;
	cursor: pointer;
	padding: 0;
}

.fz-modal-close:hover {
	background-color: #1667a8;
	border-color: #1667a8;
	color: #ffffff;
}

/* ------------------------------------------------------------- Galerie -- */

.fz-gallery-stage {
	position: relative;
	background-color: #e8f1f9;
	overflow: hidden;
}

.fz-gallery-stage img {
	display: block;
	width: 100%;
	max-height: 42vh;
	object-fit: contain;
	background-color: #e8f1f9;
}

.fz-gallery-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	appearance: none;
	-webkit-appearance: none;
	background-color: rgba(255, 255, 255, 0.92);
	border: solid 1px rgba(31, 42, 68, 0.25);
	color: #1f2a44;
	cursor: pointer;
	width: 2.4em;
	height: 2.4em;
	border-radius: 50%;
	font-size: 1.1em;
	line-height: 1;
	padding: 0;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.fz-gallery-nav:hover {
	background-color: #1667a8;
	border-color: #1667a8;
	color: #ffffff;
}

.fz-gallery-nav.fz-prev { left: 0.75em; }
.fz-gallery-nav.fz-next { right: 0.75em; }

.fz-gallery-counter {
	position: absolute;
	right: 0.75em;
	bottom: 0.75em;
	z-index: 2;
	/* liegt auf dem Foto, nicht auf der weissen Flaeche - bleibt deshalb
	   dunkel mit heller Schrift, sonst verschwindet es in hellen Bildern */
	background-color: rgba(31, 42, 68, 0.8);
	color: #ffffff;
	font-size: 0.7em;
	letter-spacing: 0.1em;
	padding: 0.45em 0.8em;
	border-radius: 3px;
}

.fz-gallery-thumbs {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	padding: 4px;
	background-color: #e8f1f9;
}

.fz-gallery-thumbs img {
	flex: 0 0 auto;
	width: 68px;
	height: 50px;
	object-fit: cover;
	cursor: pointer;
	border: solid 2px transparent;
	border-radius: 3px;
	opacity: 0.5;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.fz-gallery-thumbs img:hover {
	opacity: 0.85;
}

.fz-gallery-thumbs img.is-active {
	border-color: #1667a8;
	opacity: 1;
}

/* Ein-Bild- und Kein-Bild-Fall: Navigation und Streifen wegblenden */
.fz-gallery.is-single .fz-gallery-nav,
.fz-gallery.is-single .fz-gallery-counter,
.fz-gallery.is-single .fz-gallery-thumbs,
.fz-gallery.is-empty {
	display: none;
}

/* ---------------------------------------------------------------- Text -- */

.fz-modal-body {
	padding: 1.75em 2em 2em 2em;
}

.fz-modal-body h2 {
	font-size: 1.25em;
	color: #1f2a44;
	margin-bottom: 0.3em;
}

.fz-modal-price {
	font-size: 1.5em;
	font-weight: 700;
	color: #1667a8;
	margin-bottom: 1.25em;
}

.fz-specs {
	display: grid;
	/* breit genug, damit "Kilometerstand  240.000 km" in eine Zeile passt */
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 0.6em 2em;
	margin-bottom: 1.75em;
	padding-top: 1.25em;
	border-top: solid 1px rgba(31, 42, 68, 0.15);
}

.fz-specs div {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1.5em;
	border-bottom: solid 1px rgba(31, 42, 68, 0.08);
	padding-bottom: 0.55em;
}

.fz-specs dt {
	font-size: 0.8em;
	color: rgba(31, 42, 68, 0.6);
	margin: 0;
	white-space: nowrap;
}

.fz-specs dd {
	font-size: 0.85em;
	font-weight: 700;
	color: #1f2a44;
	margin: 0;
	text-align: right;
	white-space: nowrap;
}

.fz-desc {
	font-size: 0.85em;
	line-height: 1.7;
	color: rgba(31, 42, 68, 0.8);
	max-height: 24em;
	overflow-y: auto;
	margin-bottom: 1.75em;
	padding: 1.1em 1.35em;
	background-color: rgba(31, 42, 68, 0.05);
	border-left: solid 3px #1667a8;
	border-radius: 3px;
}

.fz-desc[hidden] {
	display: none;
}

.fz-desc p {
	margin: 0 0 0.9em 0;
}

.fz-desc > :last-child {
	margin-bottom: 0;
}

.fz-desc b,
.fz-desc strong {
	color: #1f2a44;
	display: inline-block;
	margin-top: 0.4em;
}

/* Punkte kommen aus main.css, nur die Abstaende sind dort auf 2em ausgelegt -
   viel zu viel fuer die Ausstattungsliste in der schmalen Box */
.fz-desc ul,
.fz-desc ol {
	margin: 0.5em 0 0.9em 0;
}

.fz-desc li {
	margin: 0.2em 0;
}

.fz-modal-link {
	width: 100%;
	text-align: center;
}

@media screen and (max-width: 736px) {

	.fz-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.fz-tools input[type="search"],
	.fz-tools select {
		min-width: 0;
		flex: 1;
	}

	.fz-grid {
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
		gap: 1.25em;
	}

	.fz-modal {
		padding: 0;
	}

	.fz-modal-box {
		max-height: 100vh;
		border-radius: 0;
		border: 0;
	}

	.fz-modal-body {
		padding: 1.5em;
	}

	.fz-gallery-stage img {
		max-height: 34vh;
	}

	/* eine Spalte, damit Label und Wert nie umbrechen */
	.fz-specs {
		grid-template-columns: 1fr;
	}

}
