/* FF Seal Laser configurator – fully scoped, ffsl- prefix. Only loaded on
   the bound product page; does not modify theme styles. */

.ffsl-wrap {
	--ffsl-accent: #4a3f6b;
	--ffsl-border: #e3e0da;
	--ffsl-muted: #6b6b66;
	--ffsl-radius: 10px;
	box-sizing: border-box;
	margin: 1.5em 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.5;
	color: #24241f;
}
.ffsl-wrap *,
.ffsl-wrap *::before,
.ffsl-wrap *::after { box-sizing: border-box; }

.ffsl-block {
	border: 1px solid var(--ffsl-border);
	border-radius: var(--ffsl-radius);
	padding: 16px 18px;
	margin: 0 0 14px;
	background: #fff;
}
.ffsl-title {
	font-size: 1.02em;
	font-weight: 700;
	margin: 0 0 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.ffsl-title .ffsl-step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--ffsl-accent);
	color: #fff;
	font-size: 0.8em;
	flex: 0 0 auto;
}
.ffsl-cn {
	font-style: normal;
	color: var(--ffsl-muted);
	font-size: 0.9em;
}

.ffsl-materials {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	align-items: baseline;
	margin-bottom: 4px;
}
.ffsl-card {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
}
.ffsl-card:hover .ffsl-card-name { color: var(--ffsl-accent); }
.ffsl-card input[type="radio"] {
	margin: 0 2px 0 0;
	width: auto;
	accent-color: var(--ffsl-accent);
	flex: 0 0 auto;
}
.ffsl-card-body {
	display: inline;
}
.ffsl-card-name {
	font-weight: 600;
}
.ffsl-card-desc {
	color: var(--ffsl-muted);
	font-size: 0.88em;
}
.ffsl-card-price {
	color: var(--ffsl-accent);
	font-weight: 700;
}
.ffsl-card.is-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
@supports not selector(:has(*)) {
	.ffsl-card input[type="radio"],
	.ffsl-chip input[type="radio"] {
		position: static;
		opacity: 1;
		pointer-events: auto;
		margin-right: 6px;
	}
}

.ffsl-label {
	display: block;
	font-weight: 600;
	margin: 0 0 6px;
}
.ffsl-hint {
	color: var(--ffsl-muted);
	font-size: 0.84em;
	margin: 6px 0 0;
}
.ffsl-wrap input[type="text"] {
	width: 100%;
	padding: 10px 12px;
	border: 1.5px solid var(--ffsl-border);
	border-radius: 8px;
	font-size: 15px;
	background: #fff;
	color: inherit;
}
.ffsl-wrap input[type="text"]:focus {
	outline: none;
	border-color: var(--ffsl-accent);
}

.ffsl-check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 10px 0 0;
	cursor: pointer;
}
.ffsl-check input[type="checkbox"] {
	margin-top: 3px;
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	accent-color: var(--ffsl-accent);
}

.ffsl-contacts {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin-bottom: 10px;
}
.ffsl-chip {
	position: relative;
	display: block;
	border: 1.5px solid var(--ffsl-border);
	border-radius: 8px;
	padding: 9px 10px;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	background: #fff;
	font-size: 0.95em;
}
.ffsl-chip input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.ffsl-chip:has(input[type="radio"]:checked) {
	border-color: var(--ffsl-accent);
	box-shadow: 0 0 0 1.5px var(--ffsl-accent) inset;
}

.ffsl-notice {
	border: 1.5px solid #e8c37a;
	background: #fdf6e7;
	border-radius: var(--ffsl-radius);
	padding: 12px 14px;
	margin: 0 0 14px;
}

.ffsl-total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border: 1.5px solid var(--ffsl-accent);
	border-radius: var(--ffsl-radius);
	padding: 10px 16px;
	margin: 0 0 14px;
	background: #f5f3f8;
}
.ffsl-total strong {
	font-size: 1.25em;
	color: var(--ffsl-accent);
}

.ffsl-error {
	border: 1.5px solid #d9534f;
	background: #fdf0ef;
	color: #a8322f;
	border-radius: 8px;
	padding: 10px 14px;
	margin: 0 0 14px;
	font-size: 0.93em;
}
.ffsl-error[hidden] { display: none; }
.ffsl-error ul { margin: 4px 0 0 18px; padding: 0; }

/* Hide the native variation selects once our UI drives them (JS adds
   ffsl-active to the form). Without JS the native UI stays usable. */
form.ffsl-active .variations {
	display: none;
}

@media (max-width: 600px) {
	.ffsl-materials { grid-template-columns: 1fr; }
	.ffsl-contacts { grid-template-columns: 1fr 1fr; }
	.ffsl-card-desc { min-height: 0; }
}
