/**
 * Shipping Protection Fee - widget styles.
 * Neutral, self-contained; inherits store colours where practical.
 */
.spf-widget {
	--spf-accent-color: var(--wd-primary-color, #16a34a);
	margin: 12px 0;
	padding: 14px 16px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	background: #fff;
}

.spf-widget--hidden {
	display: none !important;
}

.spf-widget__row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.spf-widget__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	color: var(--spf-accent-color);
	background: rgba(0, 0, 0, 0.05);
}

.spf-widget__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.spf-widget__title {
	font-weight: 600;
	line-height: 1.3;
}

.spf-widget__desc {
	font-size: 0.85em;
	opacity: 0.8;
	line-height: 1.35;
}

.spf-widget__policy {
	font-size: 0.85em;
	text-decoration: underline;
}

/* Toggle switch */
.spf-switch {
	position: relative;
	flex: 0 0 auto;
	display: inline-block;
	width: 46px;
	height: 26px;
	cursor: pointer;
}

.spf-switch__input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
}

.spf-switch__slider {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #c9ced6;
	transition: background 0.2s ease;
}

.spf-switch__slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
	transition: transform 0.2s ease;
}

.spf-switch__input:checked + .spf-switch__slider {
	background: var(--spf-accent-color);
}

.spf-switch__input:checked + .spf-switch__slider::before {
	transform: translateX(20px);
}

.spf-switch__input:focus-visible + .spf-switch__slider {
	outline: 2px solid var(--spf-accent-color);
	outline-offset: 2px;
}

/* -------------------------------------------------------------------------
 * Protection line item at cart / checkout (clean presentation)
 * ------------------------------------------------------------------------- */
.spf-cart-item .product-thumbnail img,
.spf-cart-item .cart-item__image img,
.spf-cart-item img {
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.04);
	padding: 2px;
}

.spf-cart-item .product-name,
.spf-cart-item .cart-item__name {
	font-weight: 600;
}

/* Hide the quantity stepper for the protection item — it is always 1. */
.spf-cart-item .quantity .qty,
.spf-cart-item .cart-item__quantity input {
	pointer-events: none;
	background: transparent;
	border: none;
	width: auto;
	text-align: left;
}
