.thriveo-prefs {
	--thriveo-prefs-accent: var(--thriveo-color-accent, var(--wp--preset--color--primary, #12d9e3));
	--thriveo-prefs-accent-text: var(--thriveo-color-accent-text, var(--wp--preset--color--base, #0b1220));
	--thriveo-prefs-text: var(--thriveo-color-text, var(--wp--preset--color--contrast, currentColor));
	--thriveo-prefs-border: var(--thriveo-color-border, color-mix(in srgb, currentColor 25%, transparent));
	--thriveo-prefs-danger: var(--thriveo-color-danger, #c0392b);
	--thriveo-prefs-success: var(--thriveo-color-success, #12a37a);
	--thriveo-prefs-radius: var(--thriveo-radius, 0.5rem);
	--thriveo-prefs-gap: var(--thriveo-space, 1rem);
	color: var(--thriveo-prefs-text);
	max-width: 40rem;
}

.thriveo-prefs__section {
	border-top: 1px solid var(--thriveo-prefs-border);
	margin-top: calc(var(--thriveo-prefs-gap) * 2);
	padding-top: var(--thriveo-prefs-gap);
}

.thriveo-prefs__form,
.thriveo-prefs__field {
	display: flex;
	flex-direction: column;
	gap: calc(var(--thriveo-prefs-gap) / 2);
	margin-block: var(--thriveo-prefs-gap);
}

.thriveo-prefs input[type="text"],
.thriveo-prefs input[type="email"] {
	background: transparent;
	border: 1px solid var(--thriveo-prefs-border);
	border-radius: var(--thriveo-prefs-radius);
	color: inherit;
	font: inherit;
	padding: 0.6rem 0.8rem;
}

.thriveo-prefs input:focus-visible,
.thriveo-prefs button:focus-visible,
.thriveo-prefs a:focus-visible {
	outline: 3px solid var(--thriveo-prefs-accent);
	outline-offset: 2px;
}

.thriveo-prefs__button {
	align-self: flex-start;
	background: var(--thriveo-prefs-accent);
	border: 1px solid var(--thriveo-prefs-accent);
	border-radius: var(--thriveo-prefs-radius);
	color: var(--thriveo-prefs-accent-text);
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	padding: 0.6rem 1.2rem;
	text-decoration: none;
}

.thriveo-prefs__button--secondary {
	background: transparent;
	color: inherit;
}

.thriveo-prefs__button--danger {
	background: var(--thriveo-prefs-danger);
	border-color: var(--thriveo-prefs-danger);
	color: #fff;
}

.thriveo-prefs__button:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.thriveo-prefs__link--danger {
	color: var(--thriveo-prefs-danger);
}

.thriveo-prefs__notice {
	border: 1px solid var(--thriveo-prefs-border);
	border-left-width: 6px;
	border-radius: var(--thriveo-prefs-radius);
	margin-block: var(--thriveo-prefs-gap);
	padding: 0.75rem 1rem;
}

.thriveo-prefs__notice--success {
	border-left-color: var(--thriveo-prefs-success);
}

.thriveo-prefs__notice--error {
	border-left-color: var(--thriveo-prefs-danger);
}

.thriveo-prefs__notice--info {
	border-left-color: var(--thriveo-prefs-accent);
}

.thriveo-prefs__lists {
	border: 0;
	display: flex;
	flex-direction: column;
	gap: var(--thriveo-prefs-gap);
	margin: 0;
	padding: 0;
}

.thriveo-prefs__toggle {
	display: grid;
	gap: 0.15rem 0.75rem;
	grid-template-columns: auto 1fr;
}

.thriveo-prefs__toggle input[type="checkbox"] {
	appearance: none;
	background: transparent;
	border: 2px solid var(--thriveo-prefs-border);
	border-radius: 999px;
	cursor: pointer;
	height: 1.5rem;
	margin: 0.1rem 0 0;
	position: relative;
	transition: background-color 0.15s;
	width: 2.75rem;
}

.thriveo-prefs__toggle input[type="checkbox"]::after {
	background: currentColor;
	border-radius: 50%;
	content: "";
	height: 1rem;
	left: 0.15rem;
	position: absolute;
	top: 0.15rem;
	transition: transform 0.15s;
	width: 1rem;
}

.thriveo-prefs__toggle input[type="checkbox"]:checked {
	background: var(--thriveo-prefs-accent);
	border-color: var(--thriveo-prefs-accent);
}

.thriveo-prefs__toggle input[type="checkbox"]:checked::after {
	background: var(--thriveo-prefs-accent-text);
	transform: translateX(1.25rem);
}

.thriveo-prefs__toggle label {
	cursor: pointer;
	font-weight: 600;
}

.thriveo-prefs__toggle-pending {
	display: block;
	font-size: 0.85em;
	font-weight: 400;
}

.thriveo-prefs__toggle-description {
	font-size: 0.9em;
	grid-column: 2;
	margin: 0;
	opacity: 0.8;
}

.thriveo-prefs__attributes dt {
	font-weight: 600;
}

.thriveo-prefs__attributes dd {
	margin: 0 0 0.5rem;
}

.thriveo-prefs--js [data-thriveo-prefs-save] {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.thriveo-prefs__toggle input[type="checkbox"],
	.thriveo-prefs__toggle input[type="checkbox"]::after {
		transition: none;
	}
}
