/* ── Layout: options wrapper → sections → field cards ──────────────── */

.sv-po-options {
	margin: 0 0 20px;
}

.sv-po-section {
	margin-bottom: 22px;
}

.sv-po-section:last-of-type {
	margin-bottom: 10px;
}

.sv-po-section-title {
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid #e7e7e7;
	font-size: 1.05em;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.sv-po-section-fields {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.sv-po-field-row {
	background: #fafafa;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	padding: 16px 18px;
}

.sv-po-field-row.sv-po-type-content {
	background: none;
	border: none;
	padding: 0;
}

.sv-po-field-label {
	display: block;
	font-weight: 600;
	font-size: 1em;
	margin-bottom: 4px;
}

.sv-po-required-star {
	color: #b32d2e;
}

.sv-po-field-description {
	margin: 0 0 8px;
	font-size: 0.88em;
	color: #666;
}

/* ── Inputs ──────────────────────────────────────────────────────── */

.sv-po-field-row input[type="text"],
.sv-po-field-row input[type="number"],
.sv-po-field-row input[type="date"],
.sv-po-field-row input[type="time"],
.sv-po-field-row input[type="file"],
.sv-po-field-row select,
.sv-po-field-row textarea {
	display: block;
	width: 100%;
	max-width: 460px;
	box-sizing: border-box;
	padding: 10px 14px;
	border: 1px solid #d6d6d6;
	border-radius: 8px;
	background: #fff;
	font-size: 0.95em;
	line-height: 1.4;
	transition: border-color 0.15s ease;
}
/* ── Choice groups (radio / checkbox) ───────────────────────────── */

.sv-po-choice-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sv-po-choice {
	font-weight: normal;
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.sv-po-choice input[type="checkbox"],
.sv-po-choice input[type="radio"] {
	width: 17px;
	height: 17px;
	flex-shrink: 0;
	accent-color: #2a8f4d;
}

.sv-po-choice input[type="checkbox"]:disabled ~ * ,
.sv-po-choice:has( input[type="checkbox"]:disabled ) {
	opacity: 0.5;
	cursor: not-allowed;
}

.sv-po-hint {
	margin: 8px 0 0;
	font-size: 0.85em;
	color: #666;
}

.sv-po-hint-hidden {
	display: none;
}

.sv-po-extra-total {
	margin: 10px 0 0;
	padding-top: 10px;
	border-top: 1px dashed #ccc;
	font-weight: 600;
}

/* Inline style: choices laid out as a wrapping row of "checkbox + label"
   pairs — used for things like a list of delivery areas. */
.sv-po-style-inline {
	flex-direction: row;
	flex-wrap: wrap;
	column-gap: 22px;
	row-gap: 10px;
}

.sv-po-style-inline .sv-po-choice {
	width: auto;
}

/* ── Product add-ons ─────────────────────────────────────────────── */

.sv-po-product-choices {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 10px;
}

.sv-po-product-choice {
	flex-direction: column;
	align-items: center;
	text-align: center;
	width: 120px;
	padding: 10px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	gap: 4px;
}

.sv-po-product-choice img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 4px;
}

.sv-po-product-choice-name {
	font-size: 0.85em;
}

.sv-po-product-choice-price {
	font-size: 0.8em;
	color: #666;
}

.sv-po-content-block {
	width: 100%;
}

/* ── Swatch display styles (color / image / pills) ─────────────────── */

.sv-po-style-color,
.sv-po-style-image,
.sv-po-style-pills {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 10px;
}

.sv-po-choice-color input,
.sv-po-choice-image input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.sv-po-choice-color,
.sv-po-choice-image {
	position: relative;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.sv-po-swatch-color {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px #ccc;
	cursor: pointer;
}

.sv-po-choice-color input:checked + .sv-po-swatch-color {
	box-shadow: 0 0 0 2px #2271b1;
}

.sv-po-choice-image .sv-po-swatch-image {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 4px;
	border: 2px solid transparent;
	cursor: pointer;
}

.sv-po-choice-image input:checked + .sv-po-swatch-image {
	border-color: #2271b1;
}

.sv-po-choice-image .sv-po-choice-text,
.sv-po-choice-color .sv-po-choice-text {
	font-size: 0.8em;
}

.sv-po-choice-pills {
	padding: 7px 16px;
	border: 1px solid #ccc;
	border-radius: 999px;
	cursor: pointer;
	background: #fff;
}

.sv-po-choice-pills:has( input:checked ) {
	background: #2a8f4d;
	border-color: #2a8f4d;
	color: #fff;
}

.sv-po-choice-pills input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}



/* ── Product Add-on: Product Cards / compact shop-style layout ───── */
.sv-po-product-style-product_cards {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 0;
}

.sv-po-product-style-product_cards .sv-po-product-choice {
	position: relative;
	display: flex;
	flex: 0 0 98px;
	flex-direction: column;
	align-items: stretch;
	width: 98px;
	min-width: 98px;
	margin: 0;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 6px;
	background: transparent;
	box-sizing: border-box;
	cursor: pointer;
	text-align: left;
	gap: 0;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.sv-po-product-style-product_cards .sv-po-product-choice:hover {
	transform: translateY(-1px);
}

.sv-po-product-style-product_cards .sv-po-product-choice > input[type="checkbox"] {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.sv-po-product-style-product_cards .sv-po-product-choice-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 98px;
	height: 98px;
	overflow: hidden;
	border: 1px solid #e4e4e4;
	border-radius: 5px;
	background: #fff;
	box-sizing: border-box;
}

.sv-po-product-style-product_cards .sv-po-product-choice-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.sv-po-product-style-product_cards .sv-po-product-choice-name {
	display: -webkit-box;
	width: 100%;
	margin-top: 7px;
	padding: 0 2px;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.3;
	color: #555;
	text-align: left;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.sv-po-product-style-product_cards .sv-po-product-choice-price {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 0 2px;
	font-size: 12px;
	line-height: 1.2;
	white-space: nowrap;
}

.sv-po-product-style-product_cards .sv-po-product-choice-price del {
	margin-right: 3px;
	color: #aaa;
	font-size: 11px;
}

.sv-po-product-style-product_cards .sv-po-product-choice-price ins {
	color: #e89a00;
	font-weight: 600;
	text-decoration: none;
}

.sv-po-product-style-product_cards .sv-po-product-choice:has(input[type="checkbox"]:checked) {
	border-color: #e6a400;
	border-radius: 7px;
	box-shadow: 0 0 0 1px #e6a400;
}

.sv-po-product-style-product_cards .sv-po-product-choice:has(input[type="checkbox"]:checked)::after {
	content: "✓";
	position: absolute;
	top: 5px;
	right: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #2a8f4d;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}

@media (max-width: 600px) {
	.sv-po-product-style-product_cards {
		gap: 10px;
	}
	.sv-po-product-style-product_cards .sv-po-product-choice,
	.sv-po-product-style-product_cards .sv-po-product-choice-image {
		width: 90px;
		min-width: 90px;
		flex-basis: 90px;
	}
	.sv-po-product-style-product_cards .sv-po-product-choice-image {
		height: 90px;
	}
}



/* Date field */
.sv-po-field-row input[type="date"] {
	-webkit-appearance: auto !important;
	appearance: auto !important;
	padding-right: 34px !important;
}

.sv-po-field-row input[type="date"]::-webkit-calendar-picker-indicator {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	cursor: pointer;
}


.sv-po-type-formula .sv-po-formula-output {
	padding: 9px 12px;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	background: #fff;
	font-weight: 600;
}

.sv-po-date-input-wrap {
	display: flex;
	gap: 8px;
	align-items: center;
	max-width: 460px;
}

.sv-po-date-input-wrap input[type="date"] {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 34px !important;
}

.sv-po-date-input-wrap .sv-po-inline-time {
	flex: 0 0 150px;
	max-width: 150px;
}

.sv-po-product-choice select.sv-po-addon-variation {
	width: 100%;
	max-width: 100%;
	margin-top: 6px;
	padding: 6px 8px;
}

@media (max-width: 600px) {
	.sv-po-date-input-wrap { flex-wrap: wrap; }
	.sv-po-date-input-wrap .sv-po-inline-time { flex: 1 1 100%; max-width: 100%; }
}
