/**
 * Lonamed Bundle Style — card UI with toggle switches
 *
 * Light blue theme matching lonamad.ro (#3B2338).
 * High-specificity selectors + !important on critical properties to
 * override WoodMart's default button/card/form styles.
 */

/* ── Hide the native woobt section ──────────────────────────────────── */
.lbs-hidden-native {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* ── Main container ─────────────────────────────────────────────────── */
.lbs-bundle {
	--lbs-primary: #3B2338;
	--lbs-primary-light: rgba(59, 35, 56, 0.06);
	--lbs-primary-border: rgba(59, 35, 56, 0.3);
	--lbs-primary-badge: rgba(59, 35, 56, 0.1);
	--lbs-text: #1a1a1a;
	--lbs-text-muted: #6b7280;
	--lbs-border: #e5e7eb;
	--lbs-bg: #ffffff;
	--lbs-radius: 12px;
	--lbs-radius-sm: 10px;

	display: block;
	width: 100%;
	margin: 20px 0;
	font-family: inherit;
	box-sizing: border-box;
	background: var(--lbs-bg);
	border-radius: var(--lbs-radius);
	border: 1px solid var(--lbs-border);
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.lbs-bundle *,
.lbs-bundle *::before,
.lbs-bundle *::after {
	box-sizing: border-box;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.lbs-bundle__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-bottom: 1px solid var(--lbs-border);
	gap: 12px;
}

.lbs-bundle__title {
	font-size: 14px;
	font-weight: 700;
	color: var(--lbs-text);
	line-height: 1.3;
}

.lbs-bundle__subtitle {
	font-size: 12px;
	color: var(--lbs-text-muted);
	margin-top: 1px;
	line-height: 1.3;
}

.lbs-bundle__count {
	font-size: 12px;
	font-weight: 600;
	color: var(--lbs-primary);
	background: var(--lbs-primary-badge);
	padding: 4px 10px;
	border-radius: 20px;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ── Items list ─────────────────────────────────────────────────────── */
.lbs-bundle__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px;
}

/* ── Single item card ───────────────────────────────────────────────── */
.lbs-bundle__item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	background: var(--lbs-bg);
	border-radius: var(--lbs-radius-sm);
	border: 1.5px solid var(--lbs-border);
	cursor: pointer;
	transition: all 0.2s ease;
	user-select: none;
}

.lbs-bundle__item:hover {
	border-color: #d1d5db;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.lbs-bundle__item.is-selected {
	background: var(--lbs-primary-light);
	border-color: var(--lbs-primary-border);
}

/* ── Item image ─────────────────────────────────────────────────────── */
.lbs-bundle__item-img {
	width: 56px;
	height: 56px;
	border-radius: 8px;
	overflow: hidden;
	flex-shrink: 0;
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
}

.lbs-bundle__item-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lbs-bundle__item-img-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e5e7eb 25%, #f3f4f6 75%);
}

/* ── Item content ───────────────────────────────────────────────────── */
.lbs-bundle__item-content {
	flex: 1;
	min-width: 0;
}

.lbs-bundle__item-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--lbs-text);
	line-height: 1.3;
	margin-bottom: 2px;
}

.lbs-bundle__item-tag {
	display: inline-block;
	font-size: 10.5px;
	font-weight: 600;
	color: var(--lbs-primary);
	background: var(--lbs-primary-badge);
	padding: 2px 7px;
	border-radius: 4px;
	margin-bottom: 3px;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	line-height: 1.4;
}

.is-selected .lbs-bundle__item-tag {
	color: var(--lbs-primary);
	background: var(--lbs-primary-badge);
}

.lbs-bundle__item:not(.is-selected) .lbs-bundle__item-tag {
	color: var(--lbs-text-muted);
	background: #f3f4f6;
}

/* ── Item price ─────────────────────────────────────────────────────── */
.lbs-bundle__item-price {
	text-align: right;
	flex-shrink: 0;
}

.lbs-bundle__item-price-old {
	font-size: 12px;
	color: #9ca3af;
	text-decoration: line-through;
	line-height: 1.2;
}

.lbs-bundle__item-price-current {
	font-size: 15px;
	font-weight: 700;
	color: var(--lbs-primary);
	line-height: 1.2;
}

/* ── Toggle switch ──────────────────────────────────────────────────── */
.lbs-bundle .lbs-toggle,
button.lbs-toggle {
	position: relative;
	width: 48px;
	height: 26px;
	border-radius: 13px;
	border: 0 !important;
	padding: 0 !important;
	background: #d1d5db !important;
	background-color: #d1d5db !important;
	background-image: none !important;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color 0.2s ease;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none !important;
	text-decoration: none !important;
	min-height: 0;
	min-width: 0;
	display: block;
}

.lbs-bundle .lbs-toggle.is-on,
button.lbs-toggle.is-on {
	background: var(--lbs-primary) !important;
	background-color: var(--lbs-primary) !important;
}

.lbs-toggle__knob {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff !important;
	transition: left 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	pointer-events: none;
}

.lbs-toggle.is-on .lbs-toggle__knob {
	left: 25px;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.lbs-bundle__footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 16px;
	border-top: 1px solid var(--lbs-border);
	background: var(--lbs-primary-light);
}

.lbs-bundle__footer-label {
	font-size: 15px;
	font-weight: 700;
	color: var(--lbs-text);
}

.lbs-bundle__footer-prices {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
}

.lbs-bundle__footer-price-old {
	font-size: 13px;
	font-weight: 500;
	color: #9ca3af;
	text-decoration: line-through;
}

.lbs-bundle__footer-price {
	font-size: 17px;
	font-weight: 700;
	color: var(--lbs-primary);
}

/* ── Mobile responsive ──────────────────────────────────────────────── */
@media ( max-width: 480px ) {
	.lbs-bundle__item {
		gap: 10px;
		padding: 12px;
	}

	.lbs-bundle__item-img {
		width: 48px;
		height: 48px;
	}

	.lbs-bundle__item-name {
		font-size: 13px;
	}

	.lbs-bundle__item-desc {
		font-size: 11px;
	}

	.lbs-bundle__item-price-current {
		font-size: 13px;
	}

	.lbs-bundle .lbs-toggle,
	button.lbs-toggle {
		width: 42px;
		height: 24px;
	}

	.lbs-toggle__knob {
		width: 18px;
		height: 18px;
	}

	.lbs-toggle.is-on .lbs-toggle__knob {
		left: 21px;
	}

	.lbs-bundle__header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
}
