/**
 * Contact Form 7 forms in the theme's look.
 *
 * The fields themselves are already the theme's white pills (theme.json and
 * style.css style every input, select and textarea); here they fill their
 * column, the labels sit above them in Commissioner, the submit button is
 * the theme's teal pill, checkboxes are teal and 44px tall, and the messages
 * use the palette. Loaded only while Contact Form 7 is active.
 *
 * Two fields side by side (from 600px), as "First name · Last name" in the
 * form editor: wrap them in <div class="ma-form-row"> … </div>.
 */

.wpcf7-form > p,
.wpcf7-form .ma-form-row > p {
	margin: 0 0 18px;
}

.wpcf7-form label {
	color: var(--wp--preset--color--contrast-soft);
	display: block;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.wpcf7-form-control-wrap {
	display: block;
	margin-top: 6px;
}

.wpcf7-form input:is([type="text"], [type="email"], [type="tel"], [type="url"], [type="number"], [type="date"]),
.wpcf7-form select,
.wpcf7-form textarea {
	box-sizing: border-box;
	font-weight: 400;
	max-width: 100%;
	width: 100%;
}

.wpcf7-form textarea {
	min-height: 160px;
	resize: vertical;
}

@media (min-width: 600px) {
	.wpcf7-form .ma-form-row {
		column-gap: 16px;
		display: grid;
		grid-auto-columns: minmax(0, 1fr);
		grid-auto-flow: column;
	}
}

/* Checkboxes, radio buttons and the acceptance box. */
.wpcf7-form .wpcf7-list-item {
	margin: 0 18px 0 0;
}

.wpcf7-form .wpcf7-list-item label {
	align-items: center;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	display: inline-flex;
	font-weight: 500;
	gap: 10px;
	min-height: 44px;
}

.wpcf7-form input:is([type="checkbox"], [type="radio"]) {
	accent-color: var(--wp--preset--color--accent);
	flex: none;
	height: 20px;
	margin: 0;
	width: 20px;
}

/* The submit button: the theme's teal pill. */
.wpcf7-form .wpcf7-submit {
	-webkit-appearance: none;
	appearance: none;
	background-color: var(--wp--preset--color--accent);
	border: 0;
	border-radius: var(--wp--preset--border-radius--pill);
	color: var(--wp--preset--color--white);
	cursor: pointer;
	font-family: var(--wp--preset--font-family--commissioner);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.2;
	min-height: 48px;
	padding: 0.95rem 1.625rem;
	transition: background-color var(--wp--custom--transition);
}

.wpcf7-form .wpcf7-submit:hover {
	background-color: var(--wp--preset--color--accent-strong-light);
}

.wpcf7-form .wpcf7-submit:active {
	background-color: var(--wp--preset--color--accent-strong);
}

.wpcf7-form .wpcf7-submit:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-light);
	outline-offset: 2px;
}

.wpcf7-form .wpcf7-submit:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

.wpcf7-form .wpcf7-spinner {
	background-color: var(--wp--preset--color--accent);
	margin: 0 14px;
	vertical-align: middle;
}

/* Errors and the message after sending. */
.wpcf7-form .wpcf7-not-valid {
	border-color: var(--wp--preset--color--berry-deep);
}

.wpcf7-form .wpcf7-not-valid-tip {
	color: var(--wp--preset--color--berry-deep);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	margin-top: 6px;
}

.wpcf7 form .wpcf7-response-output {
	background-color: var(--wp--preset--color--white);
	border: 1.5px solid currentColor;
	border-radius: var(--wp--preset--border-radius--medium);
	color: var(--wp--preset--color--berry-deep);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	margin: 16px 0 0;
	padding: 14px 18px;
}

/* Contact Form 7 colours the border by state (yellow, red, orange, green). */
.wpcf7 form .wpcf7-response-output.wpcf7-response-output {
	border-color: currentColor;
}

.wpcf7 form.sent .wpcf7-response-output.wpcf7-response-output {
	border-color: var(--wp--preset--color--sea-glass);
	color: var(--wp--preset--color--accent-strong);
}

.wpcf7 form.init .wpcf7-response-output,
.wpcf7 form.resetting .wpcf7-response-output,
.wpcf7 form.submitting .wpcf7-response-output {
	display: none;
}

/*
 * Newsletter form: the e-mail field and the button on one line (the footer
 * patterns and the contact page). In the form editor, with a hidden label
 * for screen readers:
 *
 * <div class="ma-nl"><label><span class="ma-nl__label">Email</span>[email* your-email autocomplete:email placeholder "Το email σου"]</label>[submit "Εγγραφή"]</div>
 *
 * Contact Form 7 wraps the line in a <p>; it and the label step out of the
 * layout, so the field and the button sit side by side.
 */
.wpcf7-form .ma-nl {
	align-items: flex-start;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	position: relative;
}

.wpcf7-form .ma-nl > p,
.wpcf7-form .ma-nl label:not(.ma-nl__label) {
	display: contents;
}

.wpcf7-form .ma-nl br {
	display: none;
}

.wpcf7-form .ma-nl__label {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.wpcf7-form .ma-nl .wpcf7-form-control-wrap {
	flex: 1 1 180px;
	margin: 0;
	min-width: 0;
	position: relative;
}

.wpcf7-form .ma-nl input[type="email"] {
	background-color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--sea-glass);
	min-height: 52px;
}

.wpcf7-form .ma-nl .wpcf7-submit {
	flex: none;
	min-height: 52px;
	padding-block: 0;
}

.wpcf7-form .ma-nl .wpcf7-spinner {
	margin: 0;
	pointer-events: none;
	position: absolute;
	right: 12px;
	top: 14px;
}

/*
 * The footers' pill: a white pill holding the field and a round arrow
 * button (teal; lilac with ma-newsletter--lilac). Error tips sit under it.
 */
.ma-newsletter--pill .wpcf7-form .ma-nl {
	--ma-nl-tip: var(--wp--preset--color--berry-deep);
	align-items: center;
	background-color: var(--wp--preset--color--white);
	border-radius: var(--wp--preset--border-radius--pill);
	flex-wrap: nowrap;
	gap: 8px;
	padding: 6px 6px 6px 22px;
}

.ma-newsletter--pill .wpcf7-form .ma-nl:focus-within {
	outline: 2px solid var(--ma-nl-ring, var(--wp--preset--color--accent-light));
	outline-offset: 2px;
}

.ma-newsletter--pill .wpcf7-form .ma-nl input[type="email"] {
	background-color: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: var(--wp--preset--color--contrast);
	font-weight: 500;
	min-height: 44px;
	outline: 0;
	padding: 0;
}

.ma-newsletter--pill .wpcf7-form .ma-nl .wpcf7-submit {
	background: var(--wp--preset--color--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / 18px no-repeat;
	border-radius: 50%;
	color: transparent;
	font-size: 0;
	height: 44px;
	min-height: 44px;
	padding: 0;
	width: 44px;
}

.ma-newsletter--pill .wpcf7-form .ma-nl .wpcf7-submit:hover {
	background-color: var(--wp--preset--color--accent-strong-light);
}

.ma-newsletter--lilac .wpcf7-form .ma-nl .wpcf7-submit {
	background-color: var(--wp--preset--color--pink);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233B2449' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
}

.ma-newsletter--lilac .wpcf7-form .ma-nl .wpcf7-submit:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--pink) 60%, var(--wp--preset--color--pink-deep));
}

.ma-newsletter--pill .wpcf7-form .ma-nl .wpcf7-spinner {
	right: 16px;
	top: 16px;
}

.ma-newsletter--pill .wpcf7-form .ma-nl:has(.wpcf7-not-valid-tip) {
	margin-bottom: 42px;
}

.ma-newsletter--pill .wpcf7-form .ma-nl .wpcf7-not-valid-tip {
	color: var(--ma-nl-tip);
	left: 0;
	margin: 0;
	position: absolute;
	top: calc(100% + 14px);
	white-space: nowrap;
}

/* On teal (the "Three layers" footer): a cream focus ring and cream tips. */
.ma-foot--layers .ma-newsletter--pill .wpcf7-form .ma-nl {
	--ma-nl-ring: var(--wp--preset--color--butter);
	--ma-nl-tip: var(--wp--preset--color--pink-soft);
}

.ma-foot__strip .ma-newsletter--pill .wpcf7-form .ma-nl {
	--ma-nl-ring: var(--wp--preset--color--plum);
	--ma-nl-tip: var(--wp--preset--color--plum);
}
