/* Swop Field Rules — voorkant. Neutraal, zodat het thema de toon zet. */

.swfr-nl__row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 8px;
}

.swfr-nl__part {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.swfr-nl__part input {
	width: 100%;
}

.swfr-nl__part--postcode { flex: 0 1 9em; }
.swfr-nl__part--nr { flex: 0 1 6em; }
.swfr-nl__part--add { flex: 0 1 6em; }
.swfr-nl__part--street { flex: 2 1 14em; }
.swfr-nl__part--city { flex: 1 1 10em; }

.swfr-nl__status {
	min-height: 1.2em;
	font-size: 0.9em;
	opacity: 0.85;
}

.swfr-nl__status.is-ok::before {
	content: "\2713\00a0";
}

.swfr-nl__status.is-warn {
	opacity: 1;
}

.swfr-ac {
	position: relative;
}

.swfr-ac__list {
	position: absolute;
	z-index: 50;
	left: 0;
	right: 0;
	top: 100%;
	max-height: 260px;
	margin: 2px 0 0 !important;
	padding: 0 !important;
	overflow-y: auto;
	list-style: none !important;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.2);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.swfr-ac__list[hidden] {
	display: none;
}

.swfr-ac__list li {
	margin: 0 !important;
	padding: 8px 12px !important;
	cursor: pointer;
	line-height: 1.35;
}

.swfr-ac__list li[aria-selected="true"],
.swfr-ac__list li[role="option"]:hover {
	background: rgba(0, 0, 0, 0.06);
}

.swfr-ac__empty {
	cursor: default !important;
	opacity: 0.7;
}

.swfr-ack {
	margin-top: 8px;
}

.swfr-ack label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
}

.swfr-typo {
	margin-top: 4px;
	font-size: 0.9em;
}

.swfr-typo__fix {
	padding: 0;
	font: inherit;
	font-weight: 600;
	color: inherit;
	text-decoration: underline;
	background: none;
	border: 0;
	cursor: pointer;
}

/* Gewoon adresveld: Nederlandse volgorde. Rollen komen van het script (swfr-o-*),
   zodat postcode en plaats in elk vak mogen staan. Zonder postcode-eerst
   verandert alleen de volgorde; breedtes en tussenruimte blijven van het thema. */
.swfr-order > .gf_clear { display: none; }

.swfr-order > .swfr-o-street { order: 1; }
.swfr-order > .swfr-o-line2  { order: 2; }
.swfr-order > .swfr-o-zip    { order: 3; }
.swfr-order > .swfr-o-city   { order: 4; }
.swfr-order > .swfr-o-rest   { order: 5; }
.swfr-order > .swfr-nl__status { order: 9; flex: 1 1 100%; }

/* Oudere opmaak van Gravity Forms gebruikt float in plaats van flex. */
.swfr-order:not(.gform-grid-row) {
	display: flex !important;
	flex-wrap: wrap;
}

.swfr-order:not(.gform-grid-row) > span {
	float: none !important;
}

/* Postcode + huisnummer eerst: vast raster.
   Computer:  postcode | huisnummer | toevoeging
   Mobiel:    postcode (volle breedte)
              huisnummer | toevoeging (2:1)
   Daaronder: samenvatting of straat en plaats. */
.swfr-pcfirst {
	display: grid !important;
	grid-template-columns: minmax(7em, 9em) minmax(5em, 7em) minmax(5em, 7em) 1fr;
	column-gap: 12px;
	row-gap: 16px;
	align-items: end;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.swfr-pcfirst > span,
.swfr-pcfirst .swfr-hn__part {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	min-width: 0;
}

/* De twee extra vakken worden gewone cellen in het raster. */
.swfr-pcfirst > .swfr-hn { display: contents; }

.swfr-pcfirst > .swfr-o-zip { order: 1; grid-column: 1; }
.swfr-pcfirst .swfr-hn__part { order: 2; }
.swfr-pcfirst > .swfr-card,
.swfr-pcfirst > .swfr-o-street,
.swfr-pcfirst > .swfr-o-line2,
.swfr-pcfirst > .swfr-o-city,
.swfr-pcfirst > .swfr-o-rest,
.swfr-pcfirst > .swfr-nl__status { grid-column: 1 / -1; }
.swfr-pcfirst > .swfr-nl__status { order: 3; margin-top: -8px; }
.swfr-pcfirst > .swfr-card       { order: 4; }
.swfr-pcfirst > .swfr-o-street   { order: 5; }
.swfr-pcfirst > .swfr-o-line2    { order: 6; }
.swfr-pcfirst > .swfr-o-city     { order: 7; }
.swfr-pcfirst > .swfr-o-rest     { order: 8; }

/* Mobiel: postcode op een eigen regel, huisnummer en toevoeging eronder. */
@media (max-width: 640px) {
	.swfr-pcfirst {
		grid-template-columns: 2fr 1fr;
	}
	.swfr-pcfirst > .swfr-o-zip { grid-column: 1 / -1; }
}

/* Labels en vakken binnen een cel altijd gelijk opgebouwd. */
.swfr-pcfirst > .swfr-o-zip,
.swfr-pcfirst .swfr-hn__part {
	display: flex !important;
	flex-direction: column;
	justify-content: flex-end;
}

.swfr-pcfirst > .swfr-o-zip > label,
.swfr-pcfirst .swfr-hn__part > label {
	margin-top: 0 !important;
	margin-bottom: 4px !important;
}

/* Adres als samenvatting: straat en plaats verborgen tot het adres gevonden is. */
.swfr-collapsed > .swfr-o-street,
.swfr-collapsed > .swfr-o-line2,
.swfr-collapsed > .swfr-o-city,
.swfr-collapsed > .swfr-o-rest {
	display: none !important;
}

.swfr-card {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	column-gap: 12px;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-left: 4px solid #2e7d32;
	background: rgba(46, 125, 50, 0.06);
	font-weight: 600;
}

.swfr-card[hidden] { display: none !important; }

.swfr-card__text {
	min-width: 0;
	overflow-wrap: anywhere;
}

.swfr-card__text::before {
	content: "\2713\00a0";
	color: #2e7d32;
}

.swfr-card__edit {
	width: auto !important;
	min-width: 0 !important;
	margin: 0 !important;
	background: none !important;
	border: 0 !important;
	padding: 4px 0 !important;
	color: inherit !important;
	font-size: inherit !important;
	line-height: inherit !important;
	font-weight: 400;
	text-decoration: underline;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none !important;
}

/* Lege statusregel neemt geen ruimte in. */
.swfr-pcfirst > .swfr-nl__status:empty { display: none; }

/* Wachten: bewegende balk in de vakken die gevuld worden. */
.swfr-loading input {
	background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.10) 50%, rgba(0, 0, 0, 0.04) 100%) !important;
	background-size: 200% 100% !important;
	animation: swfr-shimmer 1.1s linear infinite;
}

@keyframes swfr-shimmer {
	from { background-position: 100% 0; }
	to   { background-position: -100% 0; }
}

/* Draaiend icoontje bij "Adres zoeken…". */
.swfr-nl__status.is-busy::before {
	content: "";
	display: inline-block;
	width: 0.9em;
	height: 0.9em;
	margin-right: 6px;
	vertical-align: -0.1em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: swfr-spin 0.7s linear infinite;
}

@keyframes swfr-spin {
	to { transform: rotate(360deg); }
}

/* Net ingevuld: kort oplichten. */
input.swfr-flash {
	animation: swfr-flash 1.2s ease-out;
}

@keyframes swfr-flash {
	from { box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.45); }
	to   { box-shadow: 0 0 0 3px rgba(46, 125, 50, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.swfr-loading input,
	.swfr-nl__status.is-busy::before,
	input.swfr-flash {
		animation: none;
	}
}

.swfr-hn__part {
	display: flex;
	flex-direction: column;
	flex: 1 1 6em;
	min-width: 0;
}

.swfr-hn__part--add {
	flex: 0 1 6em;
}

.swfr-hn__part input {
	width: 100%;
}

/* Controle tijdens het invullen: verborgen melding echt verbergen, ook als het thema
   validatiemeldingen altijd als blok toont. */
.swfr-inline-msg[hidden] { display: none !important; }

/* Maand en jaar */
.swfr-month { width: 100%; max-width: 20em; }
