.thriveo-form-wrap {
	--thriveo-form-text: var(--thriveo-color-text, var(--wp--preset--color--contrast, currentColor));
	--thriveo-form-background: var(--thriveo-color-background, var(--wp--preset--color--base, transparent));
	--thriveo-form-field-background: var(--thriveo-color-surface, var(--wp--preset--color--card, var(--thriveo-form-background)));
	--thriveo-form-menu-background: var(--thriveo-color-surface-raised, var(--thriveo-color-surface, var(--wp--preset--color--card, var(--wp--preset--color--base, Canvas))));
	--thriveo-form-accent: var(--thriveo-color-accent, var(--wp--preset--color--primary, #12d9e3));
	--thriveo-form-accent-text: var(--thriveo-color-accent-text, var(--wp--preset--color--base, #0b1220));
	--thriveo-form-muted: var(--thriveo-color-muted, color-mix(in srgb, currentColor 65%, transparent));
	--thriveo-form-border: var(--thriveo-color-border, color-mix(in srgb, currentColor 30%, transparent));
	--thriveo-form-error: var(--thriveo-color-error, #d63638);
	--thriveo-form-success: var(--thriveo-color-success, #12e3a7);
	--thriveo-form-radius: var(--thriveo-radius, 6px);
	--thriveo-form-gap: var(--thriveo-space, var(--wp--preset--spacing--40, 1rem));
	--thriveo-form-font-size: var(--thriveo-font-size, inherit);
	color: var(--thriveo-form-text);
	font-size: var(--thriveo-form-font-size);
}

.thriveo-form {
	display: grid;
	gap: var(--thriveo-form-gap);
}

.thriveo-form__field {
	display: grid;
	gap: 0.35em;
}

.thriveo-form__label,
.thriveo-form__check {
	font-weight: 600;
}

.thriveo-form__check {
	display: flex;
	align-items: flex-start;
	gap: 0.6em;
	font-weight: 400;
}

.thriveo-form__check input {
	margin-top: 0.3em;
	accent-color: var(--thriveo-form-accent);
}

.thriveo-form__check a {
	color: var(--thriveo-form-accent);
}

.thriveo-form__control:not([type="checkbox"]) {
	box-sizing: border-box;
	width: 100%;
	padding: 0.65em 0.8em;
	color: var(--thriveo-form-text);
	font: inherit;
	background: var(--thriveo-form-field-background);
	border: 1px solid var(--thriveo-form-border);
	border-radius: var(--thriveo-form-radius);
}

.thriveo-form__control:focus-visible,
.thriveo-form__submit:focus-visible {
	outline: 2px solid var(--thriveo-form-accent);
	outline-offset: 2px;
}

.thriveo-form-wrap .thriveo-form__control[readonly]:not([type="checkbox"]):not([type="radio"]) {
	padding-right: 2.4em;
	color: var(--thriveo-form-muted);
	cursor: default;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") no-repeat right 0.75em center / 1.1em;
	border-style: dashed;
	text-overflow: ellipsis;
}

.thriveo-form-wrap textarea.thriveo-form__control[readonly] {
	background-position: right 0.75em top 0.8em;
}

.thriveo-tags {
	position: relative;
}

.thriveo-tags__box {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 2.9em;
	padding: 0.4em 0.6em;
	background: var(--thriveo-form-field-background);
	border: 1px solid var(--thriveo-form-border);
	border-radius: var(--thriveo-form-radius);
	cursor: text;
}

.thriveo-tags__box:focus-within {
	outline: 2px solid var(--thriveo-form-accent);
	outline-offset: 2px;
}

.thriveo-form__field.is-invalid .thriveo-tags__box {
	border-color: var(--thriveo-form-error);
}

.thriveo-tags__list {
	display: contents;
	margin: 0;
	padding: 0;
	list-style: none;
}

.thriveo-tags__chip {
	display: inline-flex;
	gap: 0.35em;
	align-items: center;
	max-width: 100%;
	padding: 0.2em 0.35em 0.2em 0.75em;
	margin: 0;
	font-size: 0.9em;
	line-height: 1.3;
	color: var(--thriveo-form-text);
	background: color-mix(in srgb, var(--thriveo-form-accent) 18%, transparent);
	border: 1px solid color-mix(in srgb, var(--thriveo-form-accent) 55%, transparent);
	border-radius: 999px;
}

.thriveo-tags__text {
	overflow-wrap: anywhere;
}

.thriveo-tags__remove {
	display: inline-grid;
	place-items: center;
	width: 1.5em;
	height: 1.5em;
	padding: 0;
	font: inherit;
	line-height: 1;
	color: inherit;
	cursor: pointer;
	background: transparent;
	border: 0;
	border-radius: 50%;
}

.thriveo-tags__remove:hover,
.thriveo-tags__remove:focus-visible {
	background: color-mix(in srgb, var(--thriveo-form-accent) 35%, transparent);
	outline: 2px solid var(--thriveo-form-accent);
	outline-offset: 1px;
}

.thriveo-tags__input {
	flex: 1 1 10em;
	min-width: 8em;
	padding: 0.25em 0.2em;
	margin: 0;
	font: inherit;
	color: var(--thriveo-form-text);
	background: transparent;
	border: 0;
	outline: 0;
	box-shadow: none;
}

.thriveo-tags__input::placeholder {
	color: var(--thriveo-form-muted);
}

.thriveo-tags.is-full .thriveo-tags__input {
	flex-basis: 3em;
}

.thriveo-tags__menu {
	position: absolute;
	inset-inline: 0;
	z-index: 20;
	max-height: 14em;
	padding: 0.3em;
	margin: 0.25em 0 0;
	overflow-y: auto;
	list-style: none;
	background: var(--thriveo-form-menu-background);
	border: 1px solid var(--thriveo-form-border);
	border-radius: var(--thriveo-form-radius);
	box-shadow: 0 8px 24px color-mix(in srgb, currentColor 22%, transparent);
}

.thriveo-tags__menu[hidden] {
	display: none;
}

.thriveo-tags__option {
	padding: 0.5em 0.7em;
	margin: 0;
	cursor: pointer;
	border-radius: calc(var(--thriveo-form-radius) - 2px);
}

.thriveo-tags__option:hover,
.thriveo-tags__option.is-active {
	background: color-mix(in srgb, var(--thriveo-form-accent) 22%, transparent);
	outline: 1px solid color-mix(in srgb, var(--thriveo-form-accent) 60%, transparent);
	outline-offset: -1px;
}

.thriveo-tags__status {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (forced-colors: active) {
	.thriveo-tags__chip,
	.thriveo-tags__option.is-active {
		border: 1px solid CanvasText;
	}
}

.thriveo-form__help {
	margin: 0;
	color: var(--thriveo-form-muted);
	font-size: 0.875em;
}

.thriveo-form__error {
	margin: 0;
	color: var(--thriveo-form-error);
	font-size: 0.875em;
}

.thriveo-form__field.is-invalid .thriveo-form__control:not([type="checkbox"]) {
	border-color: var(--thriveo-form-error);
}

.thriveo-form__required {
	color: var(--thriveo-form-error);
}

.thriveo-form__status:empty {
	display: none;
}

.thriveo-form__status {
	padding: 0.75em 1em;
	border: 1px solid var(--thriveo-form-border);
	border-radius: var(--thriveo-form-radius);
}

.thriveo-form__status.is-error {
	color: var(--thriveo-form-error);
	border-color: var(--thriveo-form-error);
}

.thriveo-form__status.is-success {
	border-color: var(--thriveo-form-success);
}

.thriveo-form__submit {
	padding: 0.7em 1.4em;
	color: var(--thriveo-form-accent-text);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	background: var(--thriveo-form-accent);
	border: 0;
	border-radius: var(--thriveo-form-radius);
}

.thriveo-form__submit:disabled {
	cursor: progress;
	opacity: 0.6;
}

.thriveo-form__hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
