/**
 * Inoforest Form
 *
 * Contents
 * 1. Variables and grid
 * 2. Labels
 * 3. Fields
 * 4. Checkboxes, radios and consent
 * 5. Button
 * 6. Messages (the fields to check), the thank-you panel, field errors
 * 7. Honeypot, editor hints, reduced motion
 *
 * Colours read the Design System (--inoforest-color-*) with the Travel26 design as fallback. Two classes on every
 * part, to beat theme and Elementor resets of inputs and buttons.
 */

/* 1. Variables and grid ----------------------------------------------------- */
.inoforest-form {
	--ino-form-accent: var(--inoforest-color-primary, #0b7a75);
	--ino-form-heading: var(--inoforest-color-heading, #0d1b2a);
	--ino-form-text: var(--inoforest-color-text, #5a6a79);
	--ino-form-surface: var(--inoforest-color-surface, #f4f8f8);
	--ino-form-border: var(--inoforest-color-border, #e5ebef);
	--ino-form-error: #e5484d;
	--ino-form-column-gap: 20px;
	--ino-form-row-gap: 20px;
	--ino-form-box: 22px;
	--ino-form-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.inoforest-form .inoforest-form__form {
	margin: 0;
}

.inoforest-form .inoforest-form__fields {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--ino-form-row-gap) var(--ino-form-column-gap);
	align-items: start;
}

.inoforest-form .inoforest-form__field {
	grid-column: span 12;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.inoforest-form .inoforest-form__field--acceptance,
.inoforest-form .inoforest-form__actions {
	align-self: center;
}

.inoforest-form .inoforest-form__actions {
	display: flex;
	flex-wrap: wrap;
	grid-column: span 12;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
	margin-top: 6px;
}

/* The text beside the button (1.2.0). */
.inoforest-form .inoforest-form__note {
	font-size: 0.875em;
	color: var(--inoforest-color-muted, var(--ino-form-text, #5a6a79));
}

/* 2. Labels ------------------------------------------------------------------ */
.inoforest-form .inoforest-form__label {
	display: block;
	float: none;
	width: auto;
	margin: 0 0 8px;
	padding: 0;
	font-size: 0.925rem;
	font-weight: 700;
	color: var(--ino-form-heading);
}

.inoforest-form .inoforest-form__required {
	color: var(--inoforest-color-accent, #ff6a3d);
}

/* Labels turned off: hidden from sight, still read by screen readers. */
.inoforest-form .inoforest-form__label--hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* 3. Fields ------------------------------------------------------------------ */
.inoforest-form .inoforest-form__control {
	display: block;
	width: 100%;
	max-width: none;
	min-height: 56px;
	margin: 0;
	padding: 14px 20px;
	font: inherit;
	color: var(--ino-form-heading);
	background-color: var(--ino-form-surface);
	border: 1px solid transparent;
	border-radius: 10px;
	outline: 0;
	box-shadow: none;
	transition: border-color 0.35s var(--ino-form-ease), background-color 0.35s var(--ino-form-ease), box-shadow 0.35s var(--ino-form-ease);
}

.inoforest-form .inoforest-form__control::placeholder {
	color: color-mix(in srgb, var(--ino-form-text) 70%, #fff);
	opacity: 1;
}

.inoforest-form .inoforest-form__control:focus {
	background-color: var(--inoforest-color-background, #fff);
	border-color: var(--ino-form-accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--ino-form-accent) 12%, transparent);
}

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

.inoforest-form select.inoforest-form__control {
	padding-right: 46px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='20' height='20'%3E%3Cpath fill='%238b99a6' d='M12 13.172l4.95-4.95 1.414 1.414L12 16 5.636 9.636 7.05 8.222z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 18px center;
	background-size: 20px;
	appearance: none;
	-webkit-appearance: none;
}

.inoforest-form .inoforest-form__control[aria-invalid="true"] {
	border-color: var(--ino-form-error);
}

/* 4. Checkboxes, radios and consent -------------------------------------------- */
.inoforest-form .inoforest-form__options {
	display: grid;
	gap: 12px;
}

.inoforest-form .inoforest-form__options.is-inline {
	display: flex;
	flex-wrap: wrap;
	column-gap: 24px;
}

.inoforest-form .inoforest-form__option {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-size: 0.925rem;
	font-weight: 500;
	color: var(--ino-form-text);
	cursor: pointer;
}

/* The real input stays in the page (keyboard, screen readers, validation); the box beside it is what shows. */
.inoforest-form .inoforest-form__option input {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--ino-form-box);
	height: var(--ino-form-box);
	margin: 0;
	opacity: 0;
}

.inoforest-form .inoforest-form__box {
	flex: none;
	width: var(--ino-form-box);
	height: var(--ino-form-box);
	background-color: transparent;
	background-position: center;
	background-repeat: no-repeat;
	background-size: 70%;
	border: 2px solid var(--ino-form-border);
	border-radius: 6px;
	transition: background-color 0.35s var(--ino-form-ease), border-color 0.35s var(--ino-form-ease);
}

.inoforest-form .inoforest-form__option input[type="radio"] + .inoforest-form__box {
	border-radius: 50%;
}

.inoforest-form .inoforest-form__option input:checked + .inoforest-form__box {
	background-color: var(--ino-form-accent);
	border-color: var(--ino-form-accent);
}

.inoforest-form .inoforest-form__option input[type="checkbox"]:checked + .inoforest-form__box {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M10 15.17l9.19-9.19 1.42 1.42L10 18 3.64 11.64l1.42-1.42z'/%3E%3C/svg%3E");
}

.inoforest-form .inoforest-form__option input[type="radio"]:checked + .inoforest-form__box {
	box-shadow: inset 0 0 0 4px var(--inoforest-color-background, #fff);
}

.inoforest-form .inoforest-form__option input:focus-visible + .inoforest-form__box {
	outline: 2px solid var(--inoforest-color-accent, #ff6a3d);
	outline-offset: 2px;
}

.inoforest-form .inoforest-form__option input[aria-invalid="true"] + .inoforest-form__box,
.inoforest-form [aria-invalid="true"] .inoforest-form__box {
	border-color: var(--ino-form-error);
}

.inoforest-form .inoforest-form__option a {
	color: var(--ino-form-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* 5. Button ----------------------------------------------------------------- */
.inoforest-form .inoforest-form__button {
	display: inline-flex;
	flex-grow: var(--ino-form-button-grow, 0);
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 54px;
	margin: 0;
	padding: 14px 30px;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	white-space: nowrap;
	cursor: pointer;
	background-color: var(--ino-form-accent);
	border: 2px solid var(--ino-form-accent);
	border-radius: 999px;
	transition: color 0.35s var(--ino-form-ease), background-color 0.35s var(--ino-form-ease), border-color 0.35s var(--ino-form-ease), transform 0.35s var(--ino-form-ease), box-shadow 0.35s var(--ino-form-ease);
}

.inoforest-form .inoforest-form__button:hover,
.inoforest-form .inoforest-form__button:focus-visible {
	color: #fff;
	background-color: color-mix(in srgb, var(--ino-form-accent) 75%, #000);
	border-color: color-mix(in srgb, var(--ino-form-accent) 75%, #000);
	box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--ino-form-accent) 75%, #000);
	transform: translateY(-2px);
}

.inoforest-form .inoforest-form__button:focus-visible {
	outline: 2px solid var(--inoforest-color-accent, #ff6a3d);
	outline-offset: 3px;
}

.inoforest-form .inoforest-form__button i,
.inoforest-form .inoforest-form__button svg {
	font-size: 1.15em;
}

.inoforest-form .inoforest-form__button svg {
	width: 1.15em;
	height: 1.15em;
	fill: currentColor;
}

.inoforest-form .is-sending .inoforest-form__button {
	cursor: progress;
	opacity: 0.7;
}

/* 6. Messages and field errors ------------------------------------------------- */
.inoforest-form .inoforest-form__message {
	margin-top: 16px;
	padding: 14px 18px;
	font-weight: 600;
	line-height: 1.5;
	border-radius: 10px;
}

.inoforest-form .inoforest-form__message[hidden] {
	display: none;
}

.inoforest-form .inoforest-form__message::before {
	display: inline-block;
	width: 1.15em;
	height: 1.15em;
	margin-right: 8px;
	vertical-align: -0.2em;
	content: "";
	background-color: currentColor;
	-webkit-mask: var(--ino-form-message-icon) center / contain no-repeat;
	mask: var(--ino-form-message-icon) center / contain no-repeat;
}

.inoforest-form .inoforest-form__message.is-success {
	--ino-form-message-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-.997-6l7.07-7.071-1.414-1.414-5.656 5.657-2.829-2.829-1.414 1.414L11.003 16z'/%3E%3C/svg%3E");
	color: color-mix(in srgb, var(--ino-form-accent) 75%, #000);
	background-color: color-mix(in srgb, var(--ino-form-accent) 10%, #fff);
}

.inoforest-form .inoforest-form__message.is-error {
	--ino-form-message-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-7v2h2v-2h-2zm0-8v6h2V7h-2z'/%3E%3C/svg%3E");
	color: color-mix(in srgb, var(--ino-form-error) 75%, #000);
	background-color: color-mix(in srgb, var(--ino-form-error) 10%, #fff);
}

/* The fields to check, under the message (After sending → List the fields to check). */
.inoforest-form .inoforest-form__message ul {
	margin: 6px 0 0;
	padding: 0 0 0 1.2em;
	font-weight: 400;
}

.inoforest-form .inoforest-form__message li {
	margin: 0;
}

/* The thank-you panel in place of the form (After sending → Replace the form with a thank-you panel). */
.inoforest-form .inoforest-form__thanks {
	padding: 30px 0;
	text-align: center;
	outline: 0;
}

.inoforest-form .inoforest-form__thanks[hidden] {
	display: none;
}

.inoforest-form .inoforest-form__thanks-icon {
	display: inline-grid;
	place-items: center;
	width: 84px;
	height: 84px;
	margin-bottom: 22px;
	font-size: 36px;
	color: var(--ino-form-accent);
	background-color: var(--inoforest-color-background, #fff);
	border-radius: 50%;
	box-shadow: 0 6px 20px rgba(13, 27, 42, 0.07);
}

.inoforest-form .inoforest-form__thanks-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.inoforest-form .inoforest-form__thanks-title {
	margin: 0 0 0.55em;
}

.inoforest-form .inoforest-form__thanks-text {
	max-width: 480px;
	margin: 0 auto 1.2em;
}

.inoforest-form .inoforest-form__thanks-button {
	display: inline-flex;
	text-decoration: none;
}

.inoforest-form .inoforest-form__error {
	display: block;
	margin-top: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--ino-form-error);
}

/* 7. Honeypot, editor hints, reduced motion ------------------------------------ */
.inoforest-form .inoforest-form__hp {
	position: absolute;
	inset-inline-start: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.inoforest-form .inoforest-form__hint {
	margin: 14px 0 0;
	padding: 12px 16px 12px 32px;
	font-size: 0.85rem;
	line-height: 1.5;
	color: #6b5300;
	background: #fff8e1;
	border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
	.inoforest-form .inoforest-form__control,
	.inoforest-form .inoforest-form__box,
	.inoforest-form .inoforest-form__button {
		transition: none;
	}

	.inoforest-form .inoforest-form__button:hover,
	.inoforest-form .inoforest-form__button:focus-visible {
		transform: none;
	}
}
