/*
 * amina forms (0.2.0, 0.2.1): layout of the three forms. The inputs, selects
 * and the button take the theme's styles: inside the theme's form containers
 * (.hubspot-form-container in the footer, the partner panels and the find
 * dealer block), the theme's own rules win. The field look below applies
 * outside those containers only (0.2.1: it beat the theme's textarea and
 * select rules inside them), and the button rule has fewer classes than the
 * theme's. Outside them, these rules give the same look as the theme's form
 * fields and button. No decorative lines.
 */

/*
 * 0.10.1 (finding L1): the block in page content gets the layout of the
 * theme's Simple form block (.simple-form, .simple-form .form-container): a
 * 16px gutter, a column of 708px at most, and 64px above and below, 120px
 * from 480px wide. Two blocks in a row have that space between them once.
 * The space is padding, and the margins are 0 above and below: the block gap
 * and content width rules of WordPress layouts have a lower specificity. The
 * shortcode has no afm-block wrapper.
 */
.wp-block-amina-form.afm-block {
	box-sizing: border-box;
	width: 100%;
	max-width: 740px;
	margin: 0 auto;
	padding: 64px 16px;
}

.wp-block-amina-form.afm-block + .wp-block-amina-form.afm-block {
	padding-top: 0;
}

@media (min-width: 480px) {
	.wp-block-amina-form.afm-block {
		padding-top: 120px;
		padding-bottom: 120px;
	}

	.wp-block-amina-form.afm-block + .wp-block-amina-form.afm-block {
		padding-top: 0;
	}
}

.afm .afm-fields {
	display: flex;
	flex-wrap: wrap;
	column-gap: 24px;
}

.afm .afm-field {
	flex: 1 1 100%;
	min-width: 0;
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

.afm .afm-field--first,
.afm .afm-field--last {
	flex: 1 1 200px;
}

.afm .afm-label {
	display: block;
	margin-bottom: 6px;
	padding: 0;
}

.afm .afm-input {
	display: block;
	width: 100%;
	max-width: 100%;
}

/* The look of the theme's form containers, for a form outside them. */
.afm:not(.hubspot-form-container .afm) .afm-input {
	padding: 12px 0;
	border: 0;
	border-bottom: 1px solid #413f3e;
	border-radius: 0;
	background-color: transparent;
	color: inherit;
}

.afm .afm-input[aria-invalid="true"] {
	border-bottom-width: 2px;
}

.afm .afm-field--check {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	column-gap: 12px;
}

.afm .afm-field--check label {
	flex: 1 1 0;
}

.afm .afm-check {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
}

.afm .afm-field--check .afm-error {
	flex: 1 1 100%;
}

.afm .afm-choice {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.afm a {
	color: inherit;
	text-decoration: underline;
}

.afm .afm-note,
.afm .afm-error,
.afm .afm-status {
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 1.25;
}

.afm .afm-status {
	flex: 1 1 100%;
	margin: 0 0 16px;
}

.afm .afm-status:empty {
	display: none;
}

.afm .afm-actions {
	flex: 1 1 100%;
}

.afm .afm-submit {
	padding: 11px 14px;
	border: 0;
	border-radius: 16px;
	background-color: #100f0f;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.afm .afm-submit:hover,
.afm .afm-submit:focus-visible {
	background-color: #ffad6c;
	color: #000;
}

.afm .afm-submit[disabled] {
	cursor: progress;
	opacity: 0.6;
}

.afm .afm-done p {
	margin: 0 0 8px;
}

.afm .afm-done:focus {
	outline: none;
}

/* Spam control: off screen, not display: none, so that a bot fills it in. */
.afm .afm-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.afm [hidden] {
	display: none !important;
}

/* 0.11.0: the consent text of the newsletter form, under its button (spec 10.13 question 18). */
.afm .afm-consent {
	flex: 1 1 100%;
	margin: 12px 0 0;
}

/*
 * 0.11.3 (Vaios, 28 Oct 2026: "Compact it, country and I am should be next to
 * each other"): the newsletter form is a grid. Email on its own row, Country
 * and "I am" side by side in two equal columns, then the button and the note.
 * Each column is at least half the form wide, so there are never more than
 * two; when half the form is less than 140px (a form narrower than 292px, not
 * the screen: the theme footer is about 343px wide on a 375px phone), only
 * one column fits and Country and "I am" stack. No container query: its size
 * containment can shrink a form whose box takes the width of its content.
 */
.afm--newsletter .afm-fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(max(140px, calc((100% - 12px) / 2)), 1fr));
	column-gap: 12px;
}

.afm--newsletter .afm-fields > * {
	grid-column: 1 / -1;
}

.afm--newsletter .afm-fields > .afm-field--country,
.afm--newsletter .afm-fields > .afm-field--segment {
	grid-column: auto;
}
