/* Save This — frontend form styles */

.st-save-this-form {
	position: relative;
	box-sizing: border-box;
	margin: 2em auto;
	padding: 28px 28px 24px;
	max-width: 100%;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 14px;
	background-color: #f7f5ff;
	color: #55506a;
	box-shadow: 0 6px 24px -12px rgba(0, 0, 0, 0.18);
	transition: box-shadow 0.3s ease;
	--st-accent: #6c5ce7;
}

.st-save-this-form *,
.st-save-this-form *::before,
.st-save-this-form *::after {
	box-sizing: border-box;
}

.st-save-this-form .st-heading {
	margin: 0 0 8px;
	font-size: 1.35em;
	font-weight: 700;
	line-height: 1.25;
	color: #2d2a3c;
}

.st-save-this-form .st-message {
	margin: 0 0 18px;
	font-size: 0.98em;
	line-height: 1.55;
}

.st-save-this-form .st-message p {
	margin: 0 0 0.6em;
}
.st-save-this-form .st-message p:last-child {
	margin-bottom: 0;
}

.st-save-this-form .st-field {
	margin: 0 0 14px;
}

.st-save-this-form label {
	display: block;
	margin: 0 0 5px;
	font-size: 0.85em;
	font-weight: 600;
	opacity: 0.9;
}

.st-save-this-form input[type="text"],
.st-save-this-form input[type="email"] {
	display: block;
	width: 100%;
	padding: 12px 14px;
	font-size: 15px;
	line-height: 1.4;
	color: inherit;
	background: #ffffff;
	border: 1.5px solid rgba(0, 0, 0, 0.14);
	border-radius: 8px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.st-save-this-form input[type="text"]:focus,
.st-save-this-form input[type="email"]:focus {
	border-color: var(--st-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-accent) 20%, transparent);
	border-color: var(--st-accent);
}

.st-save-this-form.st-compact input[type="text"],
.st-save-this-form.st-compact input[type="email"] {
	padding: 11px 13px;
}

.st-save-this-form .st-consent label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
	font-size: 0.88em;
	line-height: 1.45;
	opacity: 1;
}

.st-save-this-form .st-consent input[type="checkbox"] {
	margin: 3px 0 0;
	accent-color: var(--st-accent);
	flex: 0 0 auto;
}

.st-save-this-form .st-submit {
	margin-bottom: 0;
}

.st-save-this-form .st-button {
	display: inline-block;
	padding: 13px 26px;
	font-size: 15px;
	font-weight: 700;
	font-family: inherit;
	line-height: 1.2;
	color: #ffffff;
	background-color: #6c5ce7;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: 0 4px 14px -4px var(--st-accent);
	transition: transform 0.15s ease, opacity 0.2s ease, filter 0.2s ease;
}

.st-save-this-form .st-button:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

.st-save-this-form .st-button:active {
	transform: translateY(0);
}

.st-save-this-form .st-button:disabled {
	opacity: 0.75;
	cursor: default;
}

.st-save-this-form .st-button.st-loading::after {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 10px;
	vertical-align: -2px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: st-spin 0.7s linear infinite;
}

@keyframes st-spin {
	to { transform: rotate(360deg); }
}

.st-save-this-form .st-after-text {
	margin: 14px 0 0;
	font-size: 0.85em;
	line-height: 1.5;
	opacity: 0.8;
}

.st-save-this-form .st-response {
	margin-top: 14px;
	padding: 11px 14px;
	font-size: 0.92em;
	font-weight: 600;
	line-height: 1.45;
	border-radius: 8px;
}

.st-save-this-form .st-response.st-success {
	color: #0b6b3a;
	background: #e7f7ee;
	border: 1px solid #bfe8d0;
}

.st-save-this-form .st-response.st-error {
	color: #8f1f1f;
	background: #fdeaea;
	border: 1px solid #f5c6c6;
}

/* Subtle fade of the inputs after a successful save */
.st-save-this-form .st-form.st-done .st-field {
	opacity: 0.45;
	pointer-events: none;
}

/* Honeypot — visually hidden, only robots see it */
.st-save-this-form .st-hp-wrap {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	margin: 0;
}

/* Compact layout: fields and button on one row when space allows */
@media (min-width: 640px) {
	.st-save-this-form.st-compact .st-form {
		display: flex;
		flex-wrap: wrap;
		align-items: flex-end;
		gap: 12px;
	}
	.st-save-this-form.st-compact .st-field {
		flex: 1 1 170px;
		margin: 0;
	}
	.st-save-this-form.st-compact .st-field.st-submit {
		flex: 0 0 auto;
	}
}

/* ----- Spotlight when in view ----- */

.st-save-this-form.st-spotlight-enabled {
	will-change: box-shadow, transform;
}

.st-save-this-form.st-spotlight {
	animation: st-spotlight 1.7s ease-out;
}

@keyframes st-spotlight {
	0% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(255, 200, 40, 0.9), 0 6px 24px -12px rgba(0, 0, 0, 0.18);
	}
	35% {
		transform: scale(1.015);
		box-shadow: 0 0 0 16px rgba(255, 200, 40, 0), 0 10px 34px -10px rgba(0, 0, 0, 0.22);
	}
	70% {
		transform: scale(1);
		box-shadow: 0 0 0 16px rgba(255, 200, 40, 0), 0 6px 24px -12px rgba(0, 0, 0, 0.18);
	}
	100% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(255, 200, 40, 0), 0 6px 24px -12px rgba(0, 0, 0, 0.18);
	}
}

/* ----- Center alignment ----- */

.st-save-this-form.st-centered {
	text-align: center;
}

.st-save-this-form.st-centered .st-heading,
.st-save-this-form.st-centered .st-message,
.st-save-this-form.st-centered .st-after-text {
	text-align: center;
}

.st-save-this-form.st-centered label {
	text-align: center;
}

.st-save-this-form.st-centered .st-consent label {
	justify-content: center;
}

.st-save-this-form.st-centered input[type="text"],
.st-save-this-form.st-centered input[type="email"] {
	margin-left: auto;
	margin-right: auto;
	max-width: 420px;
}

.st-save-this-form.st-centered .st-button {
	display: block;
	margin: 0 auto;
}

/* ----- Larger font ----- */

.st-save-this-form.st-font-large {
	font-size: 1.1em;
}

.st-save-this-form.st-font-large .st-heading {
	font-size: 1.5em;
}

.st-save-this-form.st-font-large input[type="text"],
.st-save-this-form.st-font-large input[type="email"] {
	font-size: 17px;
	padding: 13px 15px;
}

.st-save-this-form.st-font-large .st-button {
	font-size: 17px;
	padding: 14px 28px;
}

.st-save-this-form.st-font-large .st-after-text {
	font-size: 0.92em;
}

/* ----- Optional border ----- */

.st-save-this-form.st-bordered {
	border-style: solid;
	border-color: var(--st-border-color, #6c5ce7);
	border-width: var(--st-border-width, 2px);
}
