/**
 * Gelo B2X Selection – front-end styles
 *
 * Visibility: body has .gelo-b2x-b2c or .gelo-b2x-b2b. Only the non-matching segment
 * is set to display:none so elements keep their theme display (e.g. flex, grid).
 *
 * Popup: overlay + modal panel styling below. Choice controls use theme `.btn`.
 * Header switcher is `.woocommerce a.button.alt` (WooCommerce); no
 * plugin styles on it. Anchor reset keeps popup links from looking like raw hyperlinks.
 */

/* Segment visibility: hide only the non-matching side (B2C visit → hide B2B blocks, etc.) */
body.gelo-b2x-b2c .muovia-b2b,
body.gelo-b2x-b2c .muovia-yritykset {
	display: none !important;
}

body.gelo-b2x-b2b .muovia-b2c,
body.gelo-b2x-b2b .muovia-yksityiset {
	display: none !important;
}

/* --- Popup (B2C/B2B choice): overlay + card; buttons = theme .btn --- */
.gelo-b2x-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.gelo-b2x-popup.gelo-b2x-popup-visible {
	display: flex;
}

.gelo-b2x-popup-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.gelo-b2x-popup-modal {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 28rem;
	max-height: 90vh;
	overflow: auto;
	padding: 1.5rem;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.gelo-b2x-popup-title {
	margin: 0 0 1rem;
	font-size: 1.25rem;
	line-height: 1.4;
}

.gelo-b2x-popup-body {
	margin-bottom: 1.25rem;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.gelo-b2x-popup-body:empty {
	display: none;
}

.gelo-b2x-popup-actions {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

/*
 * Popup choices only (<a> inside .gelo-b2x-popup). Header switcher is styled by WooCommerce
 * (`.woocommerce a.button.alt`). Text forced white; backgrounds from theme `.btn`.
 */
.gelo-b2x-popup a.btn {
	display: inline-block;
	box-sizing: border-box;
	text-decoration: none;
	cursor: pointer;
	color: #fff !important;
}

.gelo-b2x-popup a.btn:visited,
.gelo-b2x-popup a.btn:hover,
.gelo-b2x-popup a.btn:active,
.gelo-b2x-popup a.btn:focus,
.gelo-b2x-popup a.btn:focus-visible {
	color: #fff !important;
	text-decoration: none;
}
