/* BlankChem Shipping Protection — frontend
   Design system: #06091A bg / #0B1426 cards / #1B3A8C, #2952C8 accents
   Barlow Semi Condensed headers · IBM Plex Mono numbers · DM Sans body */

.bcsp-card {
	background: #0B1426;
	border: 1px solid rgba(41, 82, 200, 0.35);
	border-radius: 12px;
	padding: 16px 18px;
	margin: 0 0 20px;
	box-shadow: 0 2px 12px rgba(6, 9, 26, 0.45);
	font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bcsp-row {
	display: flex;
	align-items: center;
	gap: 14px;
}

/* Switch */
.bcsp-switch {
	position: relative;
	flex: 0 0 46px;
	width: 46px;
	height: 26px;
	margin: 0;
	cursor: pointer;
}
.bcsp-switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
	z-index: 2;
}
.bcsp-slider {
	position: absolute;
	inset: 0;
	background: #1a2238;
	border: 1px solid rgba(41, 82, 200, 0.4);
	border-radius: 999px;
	transition: background 0.18s ease;
}
.bcsp-slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #8b9bbf;
	transition: transform 0.18s ease, background 0.18s ease;
}
.bcsp-switch input:checked + .bcsp-slider {
	background: #1B3A8C;
	border-color: #2952C8;
}
.bcsp-switch input:checked + .bcsp-slider::before {
	transform: translateX(20px);
	background: #ffffff;
}
.bcsp-switch input:focus-visible + .bcsp-slider {
	outline: 2px solid #2952C8;
	outline-offset: 2px;
}

/* Text block */
.bcsp-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1 1 auto;
	min-width: 0;
}
.bcsp-label {
	font-family: "Barlow Semi Condensed", "DM Sans", sans-serif;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #f2f5fc;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	line-height: 1.25;
}
.bcsp-desc {
	font-size: 12.5px;
	color: #8b9bbf;
	line-height: 1.4;
}

/* Price */
.bcsp-price {
	font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 15px;
	font-weight: 600;
	color: #ffffff;
	white-space: nowrap;
	flex: 0 0 auto;
}
.bcsp-price .woocommerce-Price-amount {
	color: #ffffff;
}

/* Info icon + tooltip */
.bcsp-info {
	position: relative;
	display: inline-flex;
	align-items: center;
	color: #2952C8;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.bcsp-info:hover,
.bcsp-info:focus-visible,
.bcsp-info.bcsp-open {
	color: #5e82e8;
}
.bcsp-tooltip {
	position: absolute;
	bottom: calc(100% + 10px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	width: 280px;
	max-width: 80vw;
	background: #06091A;
	border: 1px solid #2952C8;
	border-radius: 10px;
	padding: 12px 14px;
	font-family: "DM Sans", sans-serif;
	font-size: 12.5px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1.55;
	color: #d7def0;
	box-shadow: 0 8px 24px rgba(6, 9, 26, 0.7);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, transform 0.15s ease;
	z-index: 9999;
	pointer-events: none;
}
.bcsp-tooltip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #2952C8;
}
.bcsp-info:hover .bcsp-tooltip,
.bcsp-info:focus-visible .bcsp-tooltip,
.bcsp-info.bcsp-open .bcsp-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

/* Loading state while totals refresh */
.bcsp-card.bcsp-busy {
	opacity: 0.55;
	pointer-events: none;
}

@media (max-width: 480px) {
	.bcsp-card { padding: 14px; }
	.bcsp-tooltip { left: auto; right: -10px; transform: translateY(4px); }
	.bcsp-tooltip::after { left: auto; right: 14px; transform: none; }
	.bcsp-info:hover .bcsp-tooltip,
	.bcsp-info:focus-visible .bcsp-tooltip,
	.bcsp-info.bcsp-open .bcsp-tooltip { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.bcsp-slider, .bcsp-slider::before, .bcsp-tooltip { transition: none; }
}
