.jpo-options {
	--jpo-accent: #006039;
	--jpo-border: #dce5e1;
	--jpo-muted: #68756f;
	width: 100%;
	box-sizing: border-box;
	margin-top: 20px;
	padding: 16px;
	border: 1px solid var(--jpo-border);
	border-radius: 12px;
	background: #f8fbf9;
	font-family: inherit;
	direction: rtl;
}

.jpo-options-heading h3 {
	margin: 0 0 5px;
	color: #24342d;
	font-size: 17px;
	font-weight: 800;
}

.jpo-noscript {
	margin: 0 0 12px;
	padding: 10px 12px;
	border: 1px solid #f1b5b5;
	border-radius: 8px;
	background: #fff4f4;
	color: #8b1e1e;
	font-size: 13px;
	line-height: 1.8;
}

.jpo-options-heading p {
	margin: 0;
	color: var(--jpo-muted);
	font-size: 13px;
	line-height: 1.8;
}

.jpo-groups {
	display: grid;
	gap: 14px;
	margin-top: 15px;
}

.jpo-group {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.jpo-group legend {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin-bottom: 8px;
	color: #263a31;
	font-size: 14px;
	font-weight: 750;
}

.jpo-required-mark {
	padding: 2px 7px;
	border-radius: 20px;
	background: #fff0f0;
	color: #b42318;
	font-size: 10px;
	font-weight: 700;
}

.jpo-option-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.jpo-option-card {
	min-height: 48px;
	box-sizing: border-box;
	padding: 9px 11px;
	border: 1px solid #dfe6e3;
	border-radius: 9px;
	background: #fff;
	color: #27352f;
	transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.jpo-option-choice {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto;
	gap: 9px;
	align-items: center;
	margin: 0;
	cursor: pointer;
}

.jpo-option-card:hover {
	border-color: #9bbcaf;
}

.jpo-option-card.is-selected {
	border-color: var(--jpo-accent);
	background: #f0f8f4;
	box-shadow: 0 0 0 1px var(--jpo-accent);
}

.jpo-option-choice > .jpo-option-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.jpo-option-control {
	position: relative;
	width: 18px;
	height: 18px;
	box-sizing: border-box;
	border: 2px solid #a8b3ae;
	border-radius: 5px;
	background: #fff;
}

.jpo-option-card.is-selected .jpo-option-control {
	border-color: var(--jpo-accent);
	background: var(--jpo-accent);
}

.jpo-option-choice > .jpo-option-input:focus-visible + .jpo-option-control {
	outline: 3px solid rgba(0, 96, 57, .22);
	outline-offset: 2px;
}

.jpo-option-card.is-selected .jpo-option-control::after {
	content: "";
	position: absolute;
	top: 2px;
	right: 5px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.jpo-option-label {
	min-width: 0;
	font-size: 13px;
	font-weight: 650;
	line-height: 1.5;
}

.jpo-option-price {
	color: var(--jpo-accent);
	font-size: 12px;
	font-weight: 750;
	white-space: nowrap;
}

.jpo-option-price .woocommerce-Price-amount {
	font-weight: inherit;
}

.jpo-option-price small {
	display: block;
	margin-top: 2px;
	color: var(--jpo-muted);
	font-size: 9px;
	font-weight: 500;
	text-align: left;
}

.jpo-option-details {
	display: none;
	margin: 8px 31px 0 0;
	padding-top: 8px;
	border-top: 1px solid rgba(0, 96, 57, .16);
}

.jpo-option-description {
	display: block;
	color: var(--jpo-muted);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.8;
}

.jpo-option-card.is-selected .jpo-option-details {
	display: block;
}

.jpo-option-link {
	display: inline-flex;
	align-items: center;
	margin-top: 6px;
	padding: 4px 9px;
	border: 1px solid rgba(0, 96, 57, .28);
	border-radius: 6px;
	color: var(--jpo-accent);
	font-size: 12px;
	font-weight: 750;
	line-height: 1.6;
	text-decoration: none;
}

.jpo-option-link:hover,
.jpo-option-link:focus-visible {
	border-color: var(--jpo-accent);
	background: rgba(0, 96, 57, .07);
	color: var(--jpo-accent);
	text-decoration: none;
}

.jpo-option-quantity {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 8px;
}

.jpo-option-quantity > label {
	float: none;
	width: auto;
	margin: 0;
	color: #344a40;
	font-size: 12px;
	font-weight: 700;
}

.jpo-quantity-control {
	display: inline-grid;
	grid-template-columns: 32px 54px 32px;
	align-items: stretch;
	direction: ltr;
	overflow: hidden;
	border: 1px solid #b7c9c1;
	border-radius: 7px;
	background: #fff;
}

.jpo-quantity-button,
.jpo-option-quantity-input {
	position: static;
	width: auto;
	height: 32px;
	min-width: 0;
	box-sizing: border-box;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: #fff;
	color: #263a31;
	opacity: 1;
	pointer-events: auto;
	font: inherit;
}

.jpo-quantity-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	color: var(--jpo-accent);
	font-size: 18px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
}

.jpo-quantity-button:hover,
.jpo-quantity-button:focus-visible {
	background: rgba(0, 96, 57, .08);
	color: var(--jpo-accent);
}

.jpo-option-quantity-input {
	width: 54px;
	padding: 2px 4px;
	border-right: 1px solid #d7e1dd;
	border-left: 1px solid #d7e1dd;
	text-align: center;
	-moz-appearance: textfield;
}

.jpo-option-quantity-input::-webkit-inner-spin-button,
.jpo-option-quantity-input::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.jpo-option-quantity-input:focus {
	position: relative;
	z-index: 1;
	outline: 2px solid rgba(0, 96, 57, .28);
	outline-offset: -2px;
}

.jpo-group-error {
	display: none;
	margin: 7px 2px 0;
	color: #b42318;
	font-size: 12px;
}

.jpo-group.has-error .jpo-option-list {
	padding: 5px;
	border: 1px solid #dc2626;
	border-radius: 10px;
	background: #fff7f7;
}

.jpo-group.has-error .jpo-group-error {
	display: block;
}

.jpo-total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 15px;
	padding: 12px 13px;
	border-radius: 9px;
	background: var(--jpo-accent);
	color: #fff;
}

.jpo-total > span {
	font-size: 13px;
	font-weight: 650;
}

.jpo-total-value {
	font-size: 18px;
	font-weight: 900;
	white-space: nowrap;
}

.jpo-total-value .woocommerce-Price-currencySymbol {
	font-size: .78em;
}

.jpo-toast {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 999999;
	display: flex;
	align-items: center;
	gap: 16px;
	max-width: min(440px, calc(100vw - 32px));
	padding: 13px 15px;
	border-radius: 10px;
	background: #183c2c;
	color: #fff;
	box-shadow: 0 12px 35px rgba(0, 0, 0, .22);
	font-family: inherit;
	font-size: 13px;
	line-height: 1.7;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .2s ease, transform .2s ease;
}

.jpo-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.jpo-toast.is-error {
	background: #7f1d1d;
}

.jpo-toast a {
	flex: 0 0 auto;
	padding: 5px 9px;
	border-radius: 6px;
	background: #fff;
	color: #183c2c;
	font-weight: 800;
	text-decoration: none;
}

.dark .jpo-options {
	--jpo-border: #3d4743;
	--jpo-muted: #b6c0bc;
	background: #202623;
}

.dark .jpo-options-heading h3,
.dark .jpo-group legend,
.dark .jpo-option-card {
	color: #f1f5f3;
}

.dark .jpo-option-card {
	border-color: #414c47;
	background: #292f2c;
}

.dark .jpo-option-card.is-selected {
	border-color: #35a675;
	background: #19382b;
}

.dark .jpo-option-quantity > label {
	color: #dce6e2;
}

.dark .jpo-quantity-control,
.dark .jpo-quantity-button,
.dark .jpo-option-quantity-input {
	border-color: #52615b;
	background: #29322e;
	color: #f1f5f3;
}

@media screen and (max-width: 640px) {
	.jpo-options {
		padding: 13px;
	}

	.jpo-option-list {
		grid-template-columns: 1fr;
	}

	.jpo-total {
		align-items: flex-start;
		flex-direction: column;
	}

	.jpo-option-quantity {
		align-items: flex-start;
		flex-direction: column;
	}

	.jpo-toast {
		right: 16px;
		bottom: 16px;
	}
}
