/*
 * Layout-only base styles. Colors/typography/spacing are intentionally
 * left to the Elementor style controls (see AbstractWidget) — this file
 * only supplies the structure those controls attach to, so the widgets
 * degrade sensibly outside Elementor (shortcode/Gutenberg/plain theme).
 */

.fs-widget {
	display: block;
	max-width: 640px;
}

.fs-heading {
	margin: 0 0 0.75em;
}

.fs-form p {
	display: flex;
	flex-direction: column;
	gap: 0.35em;
	margin: 0 0 1em;
}

.fs-field {
	width: 100%;
	box-sizing: border-box;
}

.fs-required {
	color: #d63637;
	margin-left: 0.2em;
}

.fs-help {
	display: block;
	line-height: 1.4;
}

.fs-repeater {
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	padding: 0.75em 1em;
	margin: 0 0 1em;
}

.fs-repeater legend {
	padding: 0;
}

.fs-repeater-item {
	padding: 0.75em 0;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.fs-repeater-item:first-of-type {
	border-top: none;
}

.fs-repeater-item-label {
	font-weight: 500;
	opacity: 0.7;
	margin: 0 0 0.5em;
}

.fs-button {
	cursor: pointer;
	border: none;
	display: inline-block;
}

.fs-button:disabled {
	opacity: 0.6;
	cursor: progress;
}

.fs-button-loading {
	position: relative;
	padding-right: 2.25em;
}

.fs-button-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 0.75em;
	width: 0.9em;
	height: 0.9em;
	margin-top: -0.45em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	opacity: 0.7;
	animation: fs-spin 0.7s linear infinite;
}

@keyframes fs-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.fs-button-loading::after {
		animation-duration: 1.5s;
	}
}

.fs-result-card {
	margin-top: 1.5em;
}

.fs-result-card[hidden] {
	display: none;
}

.fs-figures {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.4em 1em;
	margin: 0 0 1em;
}

.fs-figures dt {
	font-weight: 500;
	opacity: 0.75;
}

.fs-figures dd {
	margin: 0;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.fs-disclosure {
	font-size: 0.85em;
	opacity: 0.7;
	margin: 0 0 0.5em;
}

.fs-notes {
	font-size: 0.85em;
	opacity: 0.85;
	margin: 0;
	padding-left: 1.2em;
}

.fs-error {
	color: #d63637;
	font-weight: 500;
}

.fs-widget-disabled,
.fs-shortcode-error,
.fs-block-error {
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	padding: 0.75em 1em;
	opacity: 0.75;
}

@media (max-width: 480px) {
	.fs-figures {
		grid-template-columns: 1fr;
	}

	.fs-figures dd {
		text-align: left;
		margin-bottom: 0.5em;
	}
}
