/* Kela Fleet — frontend (widget, popup, grid, zoekbalk).
   Kleuren via CSS-variabelen; het thema kan ze overschrijven op .kela-bw / .kela-fgrid.
   .kela-bw-open staat er zelf ook bij: in modal-modus (op een voertuigpagina)
   is die knop een kaal <button>, niet ingebed in een van de andere vier — zonder
   deze eigen regel is --kela-bw-accent daar onbepaald en valt de achtergrond terug
   op transparant, met bijna-zwarte tekst op een bijna-zwarte pagina-achtergrond
   als gevolg (WCAG-contrast 1,07:1 i.p.v. de bedoelde ~5,8:1). */
.kela-bw, .kela-fgrid, .kela-fsearch, .kela-bw-overlay, .kela-bw-open {
	--kela-bw-primary: #12201a;
	--kela-bw-accent: #3eb94b;
	--kela-bw-accent-donker: #2e9e3c;
	--kela-bw-accent-zacht: #e9f7ec;
	--kela-bw-ink: #1d2823;
	--kela-bw-grijs: #5f6b64;
	--kela-bw-rand: #e2e8e4;
	--kela-bw-radius: 14px;
}

/* ---------- Widgetkaart ---------- */
.kela-bw { color: var(--kela-bw-ink); -webkit-font-smoothing: antialiased; }
.kela-bw-loading { color: var(--kela-bw-grijs); }
.kela-bw-title { margin: 0 0 18px; font-size: 1.3em; font-weight: 800; letter-spacing: -.01em; color: var(--kela-bw-primary); }
.kela-bw-photo { display: block; width: calc(100% + 44px); margin: -22px -22px 20px; aspect-ratio: 16 / 8; object-fit: cover; border-radius: var(--kela-bw-radius) var(--kela-bw-radius) 0 0; }

.kela-bw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
@media (max-width: 480px) { .kela-bw-grid { grid-template-columns: 1fr; } }

.kela-bw-field { display: flex; flex-direction: column; gap: 5px; font-weight: 700; font-size: .78em; letter-spacing: .05em; text-transform: uppercase; color: var(--kela-bw-grijs); }
.kela-bw-field em { font-weight: 500; text-transform: none; letter-spacing: 0; color: #93a099; font-style: normal; }
.kela-bw input:not([type=checkbox]), .kela-bw select, .kela-bw textarea {
	width: 100%; padding: 11px 13px; border: 1.5px solid var(--kela-bw-rand); border-radius: 10px;
	font: inherit; font-size: 15px; font-weight: 500; text-transform: none; letter-spacing: 0;
	background: #fbfdfb; color: var(--kela-bw-ink); transition: border-color .15s, background .15s, box-shadow .15s;
}
.kela-bw input:hover, .kela-bw select:hover, .kela-bw textarea:hover { border-color: #c9d4cd; }
.kela-bw input:focus-visible, .kela-bw select:focus-visible, .kela-bw textarea:focus-visible, .kela-bw button:focus-visible, .kela-bw-open:focus-visible {
	outline: none; border-color: var(--kela-bw-accent); background: #fff;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--kela-bw-accent) 22%, transparent);
}

/* ---------- Variantkaarten ---------- */
.kela-bw-variants { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 4px; }
@media (max-width: 480px) { .kela-bw-variants { grid-template-columns: 1fr; } }
.kela-bw-card {
	position: relative; display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
	padding: 13px 15px; border: 1.5px solid var(--kela-bw-rand); border-radius: 12px; background: #fbfdfb; font: inherit;
	transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.kela-bw-card:hover { border-color: var(--kela-bw-accent); transform: translateY(-1px); }
.kela-bw-card.is-active { border-color: var(--kela-bw-accent); background: var(--kela-bw-accent-zacht); box-shadow: 0 0 0 1px var(--kela-bw-accent), 0 6px 18px rgba(62, 185, 75, .16); }
.kela-bw-card.is-active::after {
	content: "✓"; position: absolute; top: 10px; right: 10px; width: 20px; height: 20px;
	background: var(--kela-bw-accent); color: #fff; border-radius: 50%; font-size: 12px; font-weight: 800;
	display: flex; align-items: center; justify-content: center;
}
.kela-bw-card strong { color: var(--kela-bw-primary); font-size: 1.02em; }
.kela-bw-hint { color: var(--kela-bw-grijs); font-size: .85em; }
.kela-bw-cardprice { margin-top: 5px; font-weight: 800; color: var(--kela-bw-accent-donker); min-height: 1.2em; font-size: 1.05em; }

/* ---------- Extra's ---------- */
.kela-bw-extras h4 { margin: 18px 0 8px; font-size: .78em; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--kela-bw-grijs); }
.kela-bw-extras .kela-bw-check {
	margin: 0 0 8px; padding: 10px 13px; border: 1.5px solid var(--kela-bw-rand); border-radius: 10px; background: #fbfdfb;
	transition: border-color .15s, background .15s; cursor: pointer;
}
.kela-bw-extras .kela-bw-check:hover { border-color: var(--kela-bw-accent); }
.kela-bw-extras .kela-bw-check:has(input:checked) { border-color: var(--kela-bw-accent); background: var(--kela-bw-accent-zacht); }
.kela-bw-check { display: flex; gap: 10px; align-items: flex-start; font-size: .95em; color: var(--kela-bw-ink); }
.kela-bw-check input { margin-top: 3px; accent-color: var(--kela-bw-accent); width: 16px; height: 16px; }

/* ---------- Meldingen & prijs ---------- */
.kela-bw-msg { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--kela-bw-accent-zacht); color: #1c6b2b; font-weight: 700; font-size: .95em; }
.kela-bw-msg.is-error { background: #fdeeee; color: #9c2b2b; }

.kela-bw-price { margin: 14px 0 4px; border: 1.5px solid var(--kela-bw-rand); border-radius: 12px; padding: 12px 16px; background: #fff; }
.kela-bw-sub { display: flex; justify-content: space-between; gap: 12px; color: var(--kela-bw-grijs); font-size: .9em; padding: 3px 0; }
.kela-bw-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 1.02em; font-weight: 700; color: var(--kela-bw-primary); border-top: 1px dashed var(--kela-bw-rand); margin-top: 6px; padding-top: 9px; }
.kela-bw-total strong { color: var(--kela-bw-accent-donker); font-size: 1.35em; letter-spacing: -.01em; }
.kela-bw-grid-3 { grid-template-columns: repeat(3, 1fr); }
.kela-bw-idstep { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--kela-bw-rand); }
.kela-bw-idstep h4 { margin: 0 0 4px; }
.kela-bw-idnote { margin: 0 0 10px; font-size: .88em; color: var(--kela-bw-grijs); }
.kela-bw-upload { margin-top: 8px; }
.kela-bw-upload input[type="file"] { font-size: .9em; }
.kela-bw-upload-status { display: inline-block; margin-top: 4px; font-size: .85em; color: var(--kela-bw-grijs); }
.kela-bw-upload-status.is-ok { color: #1a7f37; font-weight: 600; }
.kela-bw-upload-status.is-error { color: #b32d2e; font-weight: 600; }
.kela-bw-prepayment { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--kela-bw-rand); }
.kela-bw-sub-label { font-size: .85em; font-weight: 600; color: var(--kela-bw-grijs); margin-bottom: 4px; }
.kela-bw-prepayment label { display: flex; align-items: center; gap: 6px; font-size: .92em; padding: 3px 0; cursor: pointer; }

/* ---------- Knoppen ---------- */
.kela-bw-btn, .kela-bw-open {
	display: block; width: 100%; margin-top: 16px; padding: 14px 20px; border: 0; border-radius: 11px;
	background: var(--kela-bw-accent); color: #0c1a0f; font: inherit; font-size: 15.5px; font-weight: 800; cursor: pointer;
	text-align: center; box-shadow: 0 6px 16px rgba(62, 185, 75, .3), inset 0 1px 0 rgba(255, 255, 255, .25);
	transition: transform .15s, box-shadow .15s, background .15s;
}
.kela-bw-btn:hover:not(:disabled), .kela-bw-open:hover { background: #46c654; transform: translateY(-1px); box-shadow: 0 9px 22px rgba(62, 185, 75, .38), inset 0 1px 0 rgba(255, 255, 255, .25); }
.kela-bw-btn:active:not(:disabled), .kela-bw-open:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(62, 185, 75, .3); }
.kela-bw-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.kela-bw-open { margin-top: 0; }

/* ---------- Stap 2 & succes ---------- */
.kela-bw-step2 h4 { margin: 22px 0 12px; font-size: .78em; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--kela-bw-grijs); }
.kela-bw-step2 .kela-bw-field { margin-bottom: 10px; }
.kela-bw-hp { position: absolute !important; left: -9999px !important; height: 1px; width: 1px; opacity: 0; }

.kela-bw-success { text-align: center; padding: 18px 8px 10px; }
.kela-bw-success::before {
	content: "✓"; display: flex; align-items: center; justify-content: center; width: 62px; height: 62px; margin: 0 auto 14px;
	background: var(--kela-bw-accent); color: #fff; border-radius: 50%; font-size: 30px; font-weight: 800;
	box-shadow: 0 8px 24px rgba(62, 185, 75, .35);
}
.kela-bw-success h3 { color: var(--kela-bw-primary); margin: 0 0 10px; font-size: 1.25em; }
.kela-bw-success .kela-bw-hint { display: block; margin-top: 10px; }

/* ---------- Popup ---------- */
.kela-bw-overlay { position: fixed; inset: 0; background: rgba(10, 18, 13, .55); backdrop-filter: blur(3px); z-index: 99999; display: flex; align-items: flex-start; justify-content: center; padding: 40px 14px; overflow: auto; }
.kela-bw-modalwrap { position: relative; width: 100%; max-width: 560px; animation: kela-bw-in .25s ease-out; }
@keyframes kela-bw-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.kela-bw-inmodal { max-width: none; box-shadow: 0 24px 70px rgba(6, 14, 9, .4); }
.kela-bw-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; background: rgba(255, 255, 255, .92); border: 1px solid var(--kela-bw-rand); border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; color: var(--kela-bw-grijs); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); transition: color .15s, transform .15s; }
.kela-bw-close:hover { color: #9c2b2b; transform: rotate(90deg); }
body.kela-bw-noscroll { overflow: hidden; }

/* ---------- Voertuigengrid ---------- */
.kela-fperiod { margin: 0 0 18px; font-weight: 700; color: var(--kela-bw-ink); background: var(--kela-bw-accent-zacht); display: inline-block; padding: 8px 16px; border-radius: 999px; font-size: .95em; }
.kela-fcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--kela-bw-rand); border-radius: var(--kela-bw-radius); overflow: hidden; box-shadow: 0 1px 2px rgba(16, 24, 21, .04), 0 10px 28px rgba(16, 24, 21, .06); transition: transform .2s, box-shadow .2s; }
.kela-fcard:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16, 24, 21, .05), 0 18px 44px rgba(16, 24, 21, .12); }
.kela-fcard-media { display: block; aspect-ratio: 16 / 10; background: #eef3ef; overflow: hidden; }
.kela-fcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.kela-fcard:hover .kela-fcard-media img { transform: scale(1.04); }
.kela-fcard-noimg { display: flex; align-items: center; justify-content: center; font-size: 46px; color: #b7c4bb; }
.kela-fcard-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 22px; flex: 1; }
.kela-fcard-body h3 { margin: 0; color: var(--kela-bw-primary); font-size: 1.18em; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.kela-fspecs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.kela-fspecs li { background: #f1f5f2; border-radius: 999px; padding: 4px 12px; font-size: .8em; font-weight: 600; color: var(--kela-bw-grijs); }
.kela-ffoot { margin-top: auto; display: flex; flex-direction: column; gap: 11px; padding-top: 8px; }
.kela-favail { margin: 0; font-weight: 800; font-size: .85em; display: inline-flex; align-items: center; align-self: flex-start; padding: 5px 12px; border-radius: 999px; }
.kela-favail.is-ok { color: #1c6b2b; background: var(--kela-bw-accent-zacht); }
.kela-favail.is-no { color: #9c2b2b; background: #fdeeee; }
.kela-fprice { margin: 0; color: var(--kela-bw-grijs); font-size: .92em; }
.kela-fprice strong { font-size: 1.65em; font-weight: 800; color: var(--kela-bw-primary); letter-spacing: -.02em; margin: 0 2px; }
.kela-foa { font-weight: 800; font-size: 1.3em; color: var(--kela-bw-primary); }
.kela-ftel { display: block; text-align: center; padding: 12px 18px; border: 2px solid var(--kela-bw-primary); border-radius: 11px; color: var(--kela-bw-primary); font-weight: 800; text-decoration: none; transition: background .15s, color .15s; }
.kela-ftel:hover { background: var(--kela-bw-primary); color: #fff; }

/* ---------- Zoekbalk ---------- */
.kela-fsearch { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 12px; align-items: end; background: #fff; border: 1px solid var(--kela-bw-rand); border-radius: var(--kela-bw-radius); padding: 18px 20px; box-shadow: 0 2px 4px rgba(16, 24, 21, .04), 0 14px 40px rgba(16, 24, 21, .1); }
@media (max-width: 780px) { .kela-fsearch { grid-template-columns: 1fr 1fr; } .kela-fsearch label:first-child, .kela-fsearch button { grid-column: 1 / -1; } }
.kela-fsearch label { display: flex; flex-direction: column; gap: 5px; font-weight: 800; font-size: .74em; letter-spacing: .06em; text-transform: uppercase; color: var(--kela-bw-grijs); }
.kela-fsearch select, .kela-fsearch input { padding: 11px 13px; border: 1.5px solid var(--kela-bw-rand); border-radius: 10px; font: inherit; font-size: 15px; background: #fbfdfb; }
.kela-fsearch .kela-bw-open { width: auto; padding: 13px 24px; }

@media (prefers-reduced-motion: reduce) {
	.kela-bw-btn, .kela-bw-open, .kela-bw-card, .kela-fcard, .kela-fcard-media img, .kela-bw-close, .kela-bw-modalwrap { transition: none; animation: none; }
}

/* Bedrag dat nu online betaald wordt, inclusief borg (v1.16.0). */
.kela-bw-paynow { border-top: 1px solid currentColor; margin-top: 6px; padding-top: 6px; }
