.ff-wrap { --ff-accent: #2563eb; --ff-radius: 8px; --ff-border: #cbd5e1; --ff-text: inherit; --ff-gap: 1rem; max-width: 100%; box-sizing: border-box; }
.ff-wrap *, .ff-wrap *::before, .ff-wrap *::after { box-sizing: border-box; }

.ff-fields { display: flex; flex-wrap: wrap; gap: var(--ff-gap); margin-bottom: var(--ff-gap); }
.ff-field { width: 100%; min-width: 0; }
.ff-w-75 { width: calc(75% - var(--ff-gap) / 4); }
.ff-w-66 { width: calc(66.666% - var(--ff-gap) / 3); }
.ff-w-50 { width: calc(50% - var(--ff-gap) / 2); }
.ff-w-33 { width: calc(33.333% - var(--ff-gap) * 2 / 3); }
.ff-w-25 { width: calc(25% - var(--ff-gap) * 3 / 4); }
@media (max-width: 640px) { .ff-field[class*="ff-w-"] { width: 100%; } }

.ff-hidden { display: none !important; }
.ff-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.ff-wrap :where(.ff-label, .ff-legend) { display: block; font-weight: 600; margin: 0 0 .35rem; padding: 0; }
.ff-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.ff-req { color: #dc2626; }

.ff-wrap :where(.ff-input) {
	display: block; width: 100%; padding: .65rem .8rem; font: inherit; color: inherit; background: #fff;
	border: 1px solid var(--ff-border); border-radius: var(--ff-radius); box-shadow: none; line-height: 1.4; height: auto;
}
.ff-wrap :where(textarea.ff-input) { resize: vertical; min-height: 6rem; }
.ff-wrap .ff-input:focus {
	outline: 2px solid color-mix(in srgb, var(--ff-accent) 45%, transparent); outline-offset: 1px; border-color: var(--ff-accent);
}

.ff-check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400 !important; margin: .3rem 0; cursor: pointer; }
.ff-check input { margin-top: .3rem; accent-color: var(--ff-accent); flex: none; }

.ff-heading { margin: .5rem 0 0; }
.ff-divider { border: 0; border-top: 1px solid var(--ff-border); margin: .5rem 0; }
.ff-wrap :where(.ff-help) { font-size: .85em; opacity: .75; margin-top: .3rem; }
.ff-wrap :where(.ff-error) { color: #dc2626; font-size: .875em; margin-top: .3rem; }
.ff-error:empty { display: none; }
.ff-invalid input:not([type=radio]):not([type=checkbox]), .ff-invalid textarea, .ff-invalid select { border-color: #dc2626; }

.ff-range { display: flex; align-items: center; gap: .8rem; }
.ff-range input { flex: 1; accent-color: var(--ff-accent); }
.ff-range output { min-width: 2.5rem; text-align: right; font-weight: 600; }

.ff-rating { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.ff-rating input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ff-rating label { font-size: 2rem; line-height: 1; color: #cbd5e1; cursor: pointer; padding: 0 .1rem; margin: 0; font-weight: 400; transition: color .1s; }
.ff-rating input:checked ~ label, .ff-rating label:hover, .ff-rating label:hover ~ label { color: #f59e0b; }
.ff-rating input:focus-visible + label { outline: 2px solid var(--ff-accent); border-radius: 4px; }

.ff-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .25rem; }
.ff-align-center { justify-content: center; }
.ff-align-right { justify-content: flex-end; }
.ff-align-full .ff-btn { flex: 1; }
.ff-wrap :where(.ff-btn) { appearance: none; cursor: pointer; font: inherit; font-weight: 600; padding: .7rem 1.4rem; border-radius: var(--ff-radius); border: 1px solid var(--ff-accent); line-height: 1.2; transition: filter .15s, opacity .15s; }
.ff-btn[hidden] { display: none; }
.ff-wrap :where(.ff-btn-primary) { background: var(--ff-accent); color: #fff; }
.ff-wrap :where(.ff-btn-secondary) { background: transparent; color: var(--ff-accent); }
.ff-btn:hover { filter: brightness(.93); }
.ff-btn:disabled { opacity: .6; cursor: wait; }

.ff-step[hidden] { display: none; }
.ff-progress { list-style: none; display: flex; gap: .5rem; margin: 0 0 1.25rem; padding: 0; counter-reset: none; flex-wrap: wrap; }
.ff-progress li { display: flex; align-items: center; gap: .45rem; font-size: .9em; opacity: .55; margin: 0; }
.ff-progress li span { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid var(--ff-border); font-weight: 700; font-size: .8em; }
.ff-progress li.is-active { opacity: 1; font-weight: 600; }
.ff-progress li.is-active span { background: var(--ff-accent); border-color: var(--ff-accent); color: #fff; }
.ff-progress li.is-done { opacity: 1; }
.ff-progress li.is-done span { border-color: var(--ff-accent); color: var(--ff-accent); }
.ff-progress li + li::before { content: ""; width: 1.5rem; height: 2px; background: var(--ff-border); display: inline-block; margin-right: .1rem; }

.ff-message { margin-top: 1rem; }
.ff-message:empty { display: none; }
.ff-msg-ok, .ff-msg-error { padding: .85rem 1rem; border-radius: var(--ff-radius); border: 1px solid; }
.ff-msg-ok { background: #f0fdf4; border-color: #86efac; color: #14532d; }
.ff-msg-error { background: #fef2f2; border-color: #fca5a5; color: #7f1d1d; }
.ff-wrap.ff-done .ff-form, .ff-wrap.ff-done .ff-progress { display: none; }
.ff-closed { padding: .85rem 1rem; border: 1px solid var(--ff-border, #cbd5e1); border-radius: 8px; }

/* ---- Kolommen ---- */
.ff-cols { display: grid; grid-template-columns: var(--ff-cols, minmax(0, 1fr) minmax(0, 1fr)); gap: var(--ff-gap); align-items: start; }
.ff-col { min-width: 0; }
.ff-col > .ff-fields { margin-bottom: 0; }
.ff-columns { margin: 0; }
@media (max-width: 640px) { .ff-cols:not(.ff-stack-never) { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .ff-cols.ff-stack-tablet { grid-template-columns: minmax(0, 1fr); } }
.ff-type-submit .ff-actions { margin-top: 0; }

/* Betaling */
.ff-wrap :where(.ff-pay) { border: 1px solid #e5e7eb; border-radius: var(--ff-radius, 8px); padding: 1rem; margin: 0; min-width: 0; }
.ff-wrap :where(.ff-pay-opts, .ff-pay-providers) { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .25rem; }
.ff-wrap :where(.ff-pay-providers) { margin-top: .75rem; }
.ff-wrap :where(.ff-pay-opt) { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border: 1px solid #d1d5db; border-radius: var(--ff-radius, 8px); cursor: pointer; background: #fff; }
.ff-wrap :where(.ff-pay-opt:has(input:checked)) { border-color: var(--ff-accent, #2563eb); box-shadow: 0 0 0 1px var(--ff-accent, #2563eb); }
.ff-wrap :where(.ff-pay-custom) { width: 9rem; }
.ff-wrap :where(.ff-pay-fixed) { font-size: 1.1em; }
.ff-wrap :where(.ff-pay-via) { margin-top: .5rem; font-size: .9em; opacity: .75; }
.ff-wrap :where(.ff-pay-warning) { padding: .6rem .8rem; border-radius: var(--ff-radius, 8px); background: #fef3c7; color: #92400e; margin-bottom: .5rem; }
.ff-wrap :where(.ff-pay-test) { margin-top: .5rem; font-size: .85em; color: #92400e; }
.ff-wrap .ff-pay-custom[hidden] { display: none; }
