/*
 * Fahrzeugübersicht [rftrucks_fahrzeuge]
 * Farben der RF-Trucks-Seite. Schriften kommen bewusst vom Theme.
 */

.rft-listing {
	--rft-green: #009036;
	--rft-green-dark: #007a2e;
	--rft-orange: #ee7f01;
	--rft-orange-dark: #d16f00;
	--rft-text: #171717;
	--rft-muted: #595959;
	--rft-line: #dedede;
	--rft-panel: #f4f4f4;
	--rft-radius: 3px;

	color: var(--rft-text);
}

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

.rft-listing [hidden] {
	display: none !important;
}

.rft-listing p {
	margin: 0;
}

/* Filter */

/* Filterfelder und Ergebnisleiste bilden einen hellen Kasten, damit alles
   auch auf farbigen Elementor-Hintergründen lesbar bleibt */
.rft-filter {
	margin: 0 0 24px;
	background: var(--rft-panel);
	border-top: 4px solid var(--rft-green);
	border-radius: 0 0 var(--rft-radius) var(--rft-radius);
	overflow: hidden;
}

.rft-filter__fields {
	display: grid;
	grid-template-columns: 1.4fr repeat(4, 1fr);
	gap: 12px;
	align-items: end;
	padding: 20px;
}

.rft-field {
	display: block;
	margin: 0;
}

.rft-field > span {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 700;
}

.rft-listing select,
.rft-listing input[type="search"] {
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--rft-line);
	border-radius: var(--rft-radius);
	background-color: #ffffff;
	color: var(--rft-text);
	font: inherit;
	font-size: 15px;
	line-height: 1.2;
	box-shadow: none;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.rft-listing select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23009036' stroke-width='2' d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	cursor: pointer;
}

.rft-listing select:hover,
.rft-listing input[type="search"]:hover {
	border-color: #b5b5b5;
}

.rft-listing select:focus-visible,
.rft-listing input[type="search"]:focus-visible {
	border-color: var(--rft-green);
	box-shadow: 0 0 0 2px rgba(0, 144, 54, 0.25);
}

/* Leiste unter den Feldern: Treffer, Zurücksetzen, Sortierung */

.rft-filter__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	padding: 12px 20px;
	background: #ffffff;
	border-top: 1px solid var(--rft-line);
}

.rft-filter__count {
	font-size: 15px;
	color: var(--rft-muted);
}

.rft-filter__count strong {
	color: var(--rft-text);
}

.rft-listing .rft-filter__reset {
	font-size: 14px;
	color: var(--rft-green);
	text-decoration: underline;
}

.rft-listing .rft-filter__reset:hover {
	color: var(--rft-text);
}

.rft-filter__sort {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	font-size: 14px;
	color: var(--rft-muted);
}

.rft-filter__sort select {
	width: auto;
	min-width: 210px;
	height: 38px;
	font-size: 14px;
}

/* Mit Skript filtert die Leiste sofort, der Knopf ist dann überflüssig */
.rft-listing.rft-listing--js .rft-button--submit {
	display: none;
}

/* Karten */

.rft-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.rft-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid var(--rft-line);
	border-radius: var(--rft-radius);
	overflow: hidden;
	transition: box-shadow 0.2s, border-color 0.2s;
}

.rft-card:hover {
	border-color: #c8c8c8;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.rft-card__media {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--rft-panel);
}

.rft-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rft-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	padding: 16px 18px 18px;
}

.rft-card__meta {
	font-size: 13px;
	font-weight: 700;
	color: var(--rft-green);
}

.rft-card__title {
	margin: 0;
	font-size: 19px;
	line-height: 1.3;
}

.rft-listing .rft-card__title a {
	color: var(--rft-text);
	text-decoration: none;
}

.rft-listing .rft-card__title a:hover {
	color: var(--rft-green);
}

.rft-card__facts {
	font-size: 14px;
	color: var(--rft-muted);
}

.rft-card__rent {
	font-size: 14px;
	font-weight: 700;
	color: var(--rft-orange);
}

.rft-card__footer {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 14px;
}

.rft-card__price strong {
	display: block;
	font-size: 24px;
	line-height: 1.1;
	color: var(--rft-text);
}

.rft-card__price small {
	font-size: 12px;
	color: var(--rft-muted);
}

/*
 * Knöpfe. Das Theme (Hello Elementor, reset.css) färbt alle <button> und
 * Links bei :hover/:focus magenta (#c36) und lädt nach diesem Stylesheet.
 * Deshalb alle Zustände ausdrücklich und mit höherer Spezifität setzen.
 */

.rft-listing .rft-button,
.rft-listing .rft-button:focus,
.rft-listing .rft-button:active {
	display: inline-block;
	padding: 10px 18px;
	border: 2px solid var(--rft-orange);
	border-radius: var(--rft-radius);
	background: var(--rft-orange);
	color: #ffffff;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.rft-listing .rft-button:hover,
.rft-listing .rft-button:focus-visible {
	background: var(--rft-orange-dark);
	border-color: var(--rft-orange-dark);
	color: #ffffff;
}

.rft-listing .rft-button:focus-visible {
	outline: 2px solid var(--rft-green);
	outline-offset: 2px;
}

.rft-listing .rft-button--submit {
	height: 44px;
}

.rft-more {
	margin-top: 32px !important;
	text-align: center;
}

/* "Weitere Fahrzeuge anzeigen": in der Markenfarbe Grün, auch nach dem Klick */
.rft-listing .rft-more .rft-button,
.rft-listing .rft-more .rft-button:focus,
.rft-listing .rft-more .rft-button:active {
	padding: 12px 28px;
	background: var(--rft-green);
	border-color: var(--rft-green);
	color: #ffffff;
}

.rft-listing .rft-more .rft-button:hover,
.rft-listing .rft-more .rft-button:focus-visible {
	background: var(--rft-green-dark);
	border-color: var(--rft-green-dark);
	color: #ffffff;
}

.rft-listing .rft-more .rft-button:focus-visible {
	outline-color: var(--rft-orange);
}

.rft-empty {
	padding: 32px;
	background: var(--rft-panel);
	border-radius: var(--rft-radius);
	text-align: center;
	color: var(--rft-muted);
}

.rft-listing .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Tablet und Handy */

@media (max-width: 1100px) {
	.rft-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rft-filter__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rft-field--search {
		grid-column: 1 / -1;
	}
}

@media (max-width: 700px) {
	.rft-filter__fields {
		padding: 16px;
	}

	.rft-filter__bar {
		padding: 12px 16px;
	}

	.rft-filter__sort {
		width: 100%;
		margin-left: 0;
	}

	.rft-filter__sort select {
		flex: 1;
		min-width: 0;
	}

	.rft-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
