/* ==========================================================================
   MS Conditional Options — Frontend Styles
   ========================================================================== */

.mco-all-groups {
	margin: 20px 0;
}

/* ---- Group ---- */
.mco-group {
	margin-bottom: 24px;
}

.mco-group-title {
	font-size: 1em;
	font-weight: 700;
	margin: 0 0 12px;
	color: #333;
	letter-spacing: 0.02em;
}

/* ---- Option cards ---- */
.mco-opts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.mco-opt {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	padding: 8px 12px;
	cursor: pointer;
	transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
	min-width: 104px;
	min-height: 86px;
	text-align: center;
	user-select: none;
	background: #fff;
	position: relative;
	z-index: 0;
	pointer-events: auto;
}

.mco-opt input.mco-radio {
	position: absolute;
	inset: 0;
	opacity: 0;
	width: 100%;
	height: 100%;
	pointer-events: auto;
	cursor: pointer;
	z-index: 2;
}

.mco-opt:hover {
	border-color: #aaa;
	background: #fafafa;
}

.mco-opt--active {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	background: #f0f6fc;
}

/* JS fail-safe: even if script does not run, checked state still looks active in modern browsers */
.mco-opt:has(.mco-radio:checked) {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	background: #f0f6fc;
}

/* Fallback for browsers without :has support */
.mco-opt .mco-radio:checked ~ .mco-opt-name,
.mco-opt .mco-radio:checked ~ .mco-opt-price {
	color: inherit;
}

/* ---- Option image ---- */
.mco-opt-img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 5px;
	margin-bottom: 4px;
	display: block;
}

.mco-opt--no-image {
	justify-content: center;
	padding-top: 10px;
	padding-bottom: 10px;
}

.mco-opt--no-image .mco-opt-name {
	margin-top: 0;
}

.mco-opt--no-image .mco-opt-price {
	margin-top: 2px;
}

/* ---- Option text ---- */
.mco-opt-name {
	font-size: 0.92em;
	font-weight: 600;
	color: #333;
	line-height: 1.3;
}

/* ---- Price badge ---- */
.mco-opt-price {
	display: inline-block;
	font-size: 0.8em;
	font-weight: 700;
	color: #2a7e19;
	margin-top: 3px;
	min-height: 1.1em;
	transition: opacity 0.2s;
}

.mco-opt-price:empty {
	display: none;
}

.mco-opt-price.mco-price-free {
	color: #888;
	font-weight: 400;
}

/* ---- Summary line (addon surcharge display) ---- */
.mco-addon-summary {
	margin: -8px 0 16px;
	font-size: 0.88em;
	color: #555;
}

.mco-addon-summary strong {
	color: #2a7e19;
}

.mco-live-total {
	margin-top: 8px;
	font-size: 0.92em;
	color: #1f2937;
}

.mco-live-total strong {
	color: #0f6f2b;
}

.mco-live-total .mco-live-addon {
	color: #4b5563;
	font-size: 0.92em;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
	.mco-opts {
		gap: 7px;
	}

	.mco-opt {
		min-width: 90px;
		min-height: 78px;
		padding: 7px 10px;
	}

	.mco-opt-img {
		width: 38px;
		height: 38px;
	}
}
