/* Wijnsma Dealerkaart — styling
 * Kleuren staan als CSS-variabelen bovenaan, zodat ze eenvoudig naar de
 * huisstijl van Wijnsma aan te passen zijn.
 */
.wd-app {
	/* Huisstijl Wijnsma Kozijnen (overgenomen van wijnsmakozijnen.nl) */
	--wd-primary: #25a283;        /* groen — knoppen & koppen */
	--wd-primary-dark: #368b71;   /* groen hover */
	--wd-accent: #ffa62b;         /* oranje — accent/badge */
	--wd-bg: #ffffff;
	--wd-sidebar-bg: #f4f4f4;
	--wd-border: #e6e8ea;
	--wd-text: #444444;    /* body-tekst (awb-color7) */
	--wd-muted: #666666;   /* secundaire tekst (awb-color6) */
	--wd-color8: #222222;  /* koppen / knop-hovertekst (awb-color8) */
	--wd-heading: "urw-din", Arial, Helvetica, sans-serif; /* koppen = URW DIN */
	--wd-radius: 10px;
	--wd-height: 620px;

	display: grid;
	grid-template-columns: minmax(320px, 380px) 1fr;
	height: var(--wd-height);
	border: 1px solid var(--wd-border);
	border-radius: var(--wd-radius);
	overflow: hidden;
	background: var(--wd-bg);
	color: var(--wd-text);
	font-family: "Montserrat", Arial, Helvetica, sans-serif;
	letter-spacing: 0.015em; /* body-tracking als de site */
	box-shadow: 0 12px 34px rgba(37, 162, 131, 0.12);
}

/* Alle koppen exact als wijnsmakozijnen.nl: URW DIN, 700, UPPERCASE,
 * letter-spacing -0.01em, regelhoogte 1.3, donker (#222 = awb-color8).
 * (Lettergroottes blijven passend bij de compacte UI.) */
.wd-app h1, .wd-app h2, .wd-app h3, .wd-app h4, .wd-app h5, .wd-app h6 {
	font-family: var(--wd-heading);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	line-height: 1.3;
	color: var(--wd-color8);
}

/* Sidebar -------------------------------------------------------------- */
.wd-sidebar {
	display: flex;
	flex-direction: column;
	background: var(--wd-sidebar-bg);
	border-right: 1px solid var(--wd-border);
	min-height: 0;
}

.wd-search {
	padding: 22px 22px 16px;
	background: var(--wd-bg);
	border-bottom: 1px solid var(--wd-border);
}

.wd-title {
	margin: 0 0 6px;
	font-family: var(--wd-heading);
	font-size: 1.25rem;
	line-height: 1.25;
	color: var(--wd-primary);
	font-weight: 700;
}

.wd-subtitle {
	margin: 0 0 14px;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--wd-muted);
}

.wd-search-form {
	display: flex;
	gap: 8px;
}

.wd-search-input {
	flex: 1;
	padding: 11px 13px;
	border: 1px solid var(--wd-border);
	border-radius: 8px;
	font-size: 0.9rem;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.wd-search-input:focus {
	border-color: var(--wd-primary);
	box-shadow: 0 0 0 3px rgba(21, 57, 91, 0.12);
}

.wd-search-button {
	padding: 11px 22px;
	border: 1px solid var(--wd-primary);
	border-radius: 6px;
	background: var(--wd-primary);
	color: #fff;
	font-family: "urw-din", "Montserrat", sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

.wd-search-button:hover {
	background: var(--wd-primary);
	border-color: var(--wd-text, #3c3c3b);
}

.wd-search-status {
	margin: 10px 0 0;
	font-size: 0.82rem;
	color: var(--wd-muted);
	min-height: 1em;
}

/* Lijst ---------------------------------------------------------------- */
.wd-list {
	list-style: none;
	margin: 0;
	padding: 8px;
	overflow-y: auto;
	flex: 1;
	min-height: 0;
}

.wd-item {
	padding: 14px 16px;
	margin-bottom: 8px;
	background: var(--wd-bg);
	border: 1px solid var(--wd-border);
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}

.wd-item:hover {
	border-color: var(--wd-primary);
	box-shadow: 0 4px 14px rgba(15, 39, 64, 0.1);
}

.wd-item.is-active {
	border-color: var(--wd-primary);
	box-shadow: 0 0 0 2px rgba(21, 57, 91, 0.18);
}

.wd-item-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
}

.wd-item-naam {
	margin: 0;
	font-family: var(--wd-heading);
	font-size: 1rem;
	font-weight: 700;
	color: var(--wd-primary);
}

.wd-item-afstand {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--wd-accent);
	white-space: nowrap;
}

.wd-item-adres {
	margin: 4px 0 0;
	font-size: 0.85rem;
	color: var(--wd-muted);
	line-height: 1.4;
}

.wd-item-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 10px;
}

.wd-tag {
	font-size: 0.72rem;
	padding: 3px 9px;
	background: var(--wd-sidebar-bg);
	border: 1px solid var(--wd-border);
	border-radius: 999px;
	color: var(--wd-text);
}

/* Kaart ---------------------------------------------------------------- */
.wd-map {
	height: 100%;
	width: 100%;
	background: #dfe6ec;
}

/* Marker-popup --------------------------------------------------------- */
.wd-popup {
	font-family: inherit;
	min-width: 220px;
}

.wd-popup h3 {
	margin: 0 0 6px;
	font-size: 1.02rem;
	color: var(--wd-color8);
}

.wd-popup p {
	margin: 0 0 4px;
	font-size: 0.85rem;
	color: var(--wd-text);
	line-height: 1.4;
}

/* Alleen tekst-links in de popup groen kleuren — NIET de actieknoppen
 * (anders krijgen de groene knoppen groene tekst en wordt die onleesbaar). */
.wd-popup p a {
	color: var(--wd-primary);
}

/* Knoptekst in de popup expliciet vastzetten (wint van bovenstaande). */
.wd-popup-actions .wd-btn-primary,
.wd-popup-actions .wd-btn-wa {
	color: #fff;
}
.wd-popup-actions .wd-btn-ghost {
	color: var(--wd-primary);
}
.wd-popup-actions .wd-btn-primary:hover {
	color: var(--wd-color8, #222);
}
.wd-popup-actions .wd-btn-ghost:hover {
	color: #fff;
}

.wd-popup-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

/* Knoppen — exact overgenomen van wijnsmakozijnen.nl (Avada flat-button):
 * Montserrat 700, 14px, padding 12px 23px, radius 6px, 1px rand,
 * hover inverteert naar witte achtergrond met donkere tekst. */
.wd-btn {
	display: inline-block;
	padding: 12px 23px;
	border-radius: 6px;
	font-family: "urw-din", "Montserrat", sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.01em;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	border: 1px solid var(--wd-primary);
	transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

.wd-btn-primary {
	background: var(--wd-primary);
	border-color: var(--wd-primary);
	color: #fff;
}

/* Hover als de site: groen blijft, rand wordt donker (#3c3c3b = awb-color4). */
.wd-btn-primary:hover {
	background: var(--wd-primary);
	border-color: var(--wd-text, #3c3c3b);
	color: #fff;
}

.wd-btn-ghost {
	background: #fff;
	border-color: var(--wd-primary);
	color: var(--wd-primary);
}

.wd-btn-ghost:hover {
	background: var(--wd-primary);
	border-color: var(--wd-primary);
	color: #fff;
}

.wd-btn-wa {
	background: #25d366;
	color: #fff;
	border-color: #25d366;
}

.wd-btn-wa:hover {
	background: #1fb457;
}

/* Foto's, openingstijden, keurmerken in de popup ---------------------- */
.wd-fotos {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 5px;
	margin: 8px 0 10px;
}

.wd-foto {
	width: 100%;
	height: 70px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

.wd-open {
	font-size: 0.84rem !important;
	color: var(--wd-muted) !important;
}

.wd-keurmerken {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin: 8px 0 4px;
}

.wd-keurmerk {
	font-size: 0.7rem;
	font-weight: 600;
	padding: 3px 9px;
	border-radius: 6px;
	background: rgba(37, 162, 131, 0.12);
	color: var(--wd-primary-dark);
}

.wd-reviews-link {
	font-size: 0.82rem !important;
	margin-top: 6px !important;
}

/* Contactformulier (in popup) ----------------------------------------- */
.wd-contact-form {
	margin-top: 12px;
	display: none;
	flex-direction: column;
	gap: 8px;
}

.wd-contact-form.is-open {
	display: flex;
}

.wd-contact-form input,
.wd-contact-form textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid var(--wd-border);
	border-radius: 7px;
	font-size: 0.82rem;
	font-family: inherit;
	box-sizing: border-box;
}

.wd-contact-form textarea {
	resize: vertical;
	min-height: 60px;
}

.wd-contact-feedback {
	font-size: 0.8rem;
	margin-top: 4px;
}

.wd-contact-feedback.is-success { color: #15803d; }
.wd-contact-feedback.is-error { color: #b91c1c; }

/* Marker-icoon (Wijnsma-kleur) ---------------------------------------- */
.wd-marker {
	background: var(--wd-primary, #25a283);
	width: 26px;
	height: 26px;
	display: block;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	border: 2px solid #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Logo, badge, beoordeling, werkgebied -------------------------------- */
.wd-item-top {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding-right: 76px; /* ruimte voor de offerte-checkbox rechtsboven */
}

.wd-logo {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: 8px;
	object-fit: contain;
	background: #fff;
	border: 1px solid var(--wd-border);
	padding: 3px;
}

.wd-item-body {
	flex: 1;
	min-width: 0;
}

.wd-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	padding: 3px 8px;
	border-radius: 999px;
	background: rgba(37, 162, 131, 0.14);
	color: #1d7d65;
	margin-bottom: 6px;
}

.wd-badge::before {
	content: "✓";
	font-weight: 900;
}

.wd-rating {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 6px 0 0;
	font-size: 0.8rem;
	color: var(--wd-muted);
}

.wd-stars {
	--pct: 0%;
	position: relative;
	display: inline-block;
	font-size: 0.95rem;
	line-height: 1;
	font-family: Arial, sans-serif;
	letter-spacing: 1px;
}

.wd-stars::before {
	content: "★★★★★";
	color: #d9dbdc;
}

.wd-stars::after {
	content: "★★★★★";
	color: var(--wd-accent);
	position: absolute;
	inset: 0;
	width: var(--pct);
	overflow: hidden;
}

.wd-werkgebied {
	margin: 8px 0 0;
	font-size: 0.8rem;
	color: var(--wd-muted);
}

.wd-werkgebied strong {
	color: var(--wd-text);
	font-weight: 600;
}

.wd-popup .wd-badge { margin-bottom: 8px; }
.wd-popup .wd-rating { margin-top: 8px; }

/* Dekkingscirkel op de kaart */
.wd-coverage {
	stroke: var(--wd-primary, #25a283);
	fill: var(--wd-primary, #25a283);
}

/* Locatie-knop + filters ---------------------------------------------- */
.wd-locatie-button {
	margin-top: 10px;
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--wd-primary);
	background: #fff;
	color: var(--wd-primary);
	border-radius: 6px;
	font-family: "urw-din", "Montserrat", sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

.wd-locatie-button:hover {
	background: var(--wd-primary);
	color: #fff;
}

.wd-filters {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 12px;
}

.wd-filters select {
	width: 100%;
	padding: 8px 9px;
	border: 1px solid var(--wd-border);
	border-radius: 7px;
	font-size: 0.8rem;
	font-family: inherit;
	background: #fff;
	color: var(--wd-text);
}

.wd-filter-officieel {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 0.82rem;
	color: var(--wd-text);
	cursor: pointer;
}

/* Offerte-selectie per item ------------------------------------------- */
.wd-item {
	position: relative;
}

.wd-select {
	position: absolute;
	top: 10px;
	right: 10px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--wd-muted);
	background: var(--wd-sidebar-bg);
	padding: 3px 8px;
	border-radius: 999px;
	cursor: pointer;
	z-index: 2;
}

.wd-select input {
	accent-color: var(--wd-primary);
	margin: 0;
}

.wd-leeg {
	list-style: none;
	padding: 24px 16px;
	color: var(--wd-muted);
	text-align: center;
	font-size: 0.9rem;
}

/* Offerte-balk -------------------------------------------------------- */
.wd-offerte-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 16px;
	background: var(--wd-primary);
	color: #fff;
	border-top: 1px solid var(--wd-primary-dark);
}

.wd-offerte-bar[hidden] {
	display: none;
}

.wd-offerte-count {
	font-size: 0.85rem;
	font-weight: 600;
}

.wd-offerte-button {
	padding: 10px 20px;
	border: 1px solid #fff;
	border-radius: 6px;
	background: #fff;
	color: var(--wd-primary);
	font-family: "urw-din", "Montserrat", sans-serif;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .3s ease, color .3s ease;
}

.wd-offerte-button:hover {
	background: var(--wd-primary-dark);
	color: #fff;
}

/* Modal (offerte-formulier) ------------------------------------------- */
.wd-modal {
	position: fixed;
	inset: 0;
	background: rgba( 15, 23, 30, 0.55 );
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 10000;
}

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

.wd-modal-inner {
	position: relative;
	background: #fff;
	border-radius: 14px;
	padding: 28px;
	width: 100%;
	max-width: 440px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.3 );
}

.wd-modal-inner h3 {
	margin: 0 0 16px;
	color: var(--wd-color8);
	font-size: 1.2rem;
}

.wd-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	border: none;
	background: none;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--wd-muted);
	cursor: pointer;
}

.wd-offerte-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wd-offerte-form input,
.wd-offerte-form textarea {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--wd-border);
	border-radius: 8px;
	font-size: 0.9rem;
	font-family: inherit;
	box-sizing: border-box;
	color: var(--wd-text);
}

.wd-offerte-form textarea {
	resize: vertical;
	min-height: 70px;
}

.wd-offerte-feedback {
	font-size: 0.84rem;
	margin: 2px 0 0;
}

.wd-offerte-feedback.is-success { color: #15803d; }
.wd-offerte-feedback.is-error { color: #b91c1c; }

/* Honeypot (anti-spam) — onzichtbaar voor mensen, zichtbaar voor bots ---- */
.wd-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

/* Responsive ----------------------------------------------------------- */
@media (max-width: 760px) {
	.wd-app {
		grid-template-columns: 1fr;
		grid-template-rows: auto 320px;
		height: auto;
	}
	.wd-sidebar {
		border-right: none;
		border-bottom: 1px solid var(--wd-border);
		max-height: 520px;
	}
	.wd-map {
		min-height: 320px;
	}
}
