/**
 * Checkout tracking UX — bundle list + free-ship progress bar + sticky pay.
 */

.bp-ct-bundle {
	margin: 0.25rem 0 0;
}

.bp-ct-bundle__toggle {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0.15rem 0;
	cursor: pointer;
	font-size: 0.85em;
	font-weight: 500;
	text-decoration: underline;
	list-style: none;
	color: inherit;
}

.bp-ct-bundle__toggle::-webkit-details-marker {
	display: none;
}

.bp-ct-bundle__toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.bp-ct-bundle-list {
	margin: 0.2rem 0 0;
	padding-left: 1.1rem;
	font-size: 0.85em;
	line-height: 1.35;
	opacity: 0.9;
	font-weight: 400;
}

.bp-ct-bundle-list li {
	margin: 0.15rem 0;
}

/* Sticky pay — solo móvil */
.bp-ct-sticky-pay {
	display: none;
}

@media (max-width: 767px) {
	.bp-ct-sticky-pay {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 0.75rem;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 100050;
		padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
		background: #fff;
		border-top: 1px solid #ddd;
		box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
	}

	.bp-ct-sticky-pay--near {
		display: none;
	}

	body.woocommerce-checkout {
		padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
	}

	.bp-ct-sticky-pay__total {
		display: flex;
		flex-direction: column;
		min-width: 0;
		line-height: 1.25;
	}

	.bp-ct-sticky-pay__label {
		font-size: 0.75rem;
		opacity: 0.75;
	}

	.bp-ct-sticky-pay__amount {
		font-size: 1.05rem;
		font-weight: 700;
	}

	.bp-ct-sticky-pay__btn {
		flex: 0 0 auto;
		min-height: 44px;
		min-width: 7.5rem;
		margin: 0;
		padding: 0.55rem 1rem;
		font-weight: 600;
	}

	.bp-ct-sticky-pay__btn:focus-visible {
		outline: 2px solid currentColor;
		outline-offset: 2px;
	}
}

.bp-ct-freeship {
	margin: 0 0 0.75rem;
	padding: 0.65rem 0.75rem;
	border-radius: 4px;
	background: #f7f3ef;
	border: 1px solid color-mix(in srgb, #e85d04 35%, #ccc);
}

.bp-ct-freeship__label {
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 0.4rem;
	line-height: 1.3;
}

.bp-ct-freeship__track {
	height: 8px;
	border-radius: 999px;
	background: #e8e0d8;
	overflow: hidden;
}

.bp-ct-freeship__fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: #e85d04;
	min-width: 0;
	transition: width 0.25s ease;
}

.bp-ct-freeship--ok {
	border-color: color-mix(in srgb, #0f6b4c 40%, #ccc);
	background: #f0faf5;
}

.bp-ct-freeship--ok .bp-ct-freeship__fill {
	background: #0f6b4c;
	width: 100% !important;
}

@media (prefers-reduced-motion: reduce) {
	.bp-ct-freeship__fill {
		transition: none;
	}
}

.woocommerce-checkout .form-row.bp-comisionista-hidden {
	display: none !important;
}

.woocommerce-checkout .form-row.bp-shipping-name-hidden,
.woocommerce-checkout #shipping_first_name_field.bp-shipping-name-hidden,
.woocommerce-checkout #shipping_last_name_field.bp-shipping-name-hidden {
	display: none !important;
}

.woocommerce-checkout #order_comments_field .bp-notes-toggle {
	display: inline-block;
	margin: 0 0 0.5rem;
	padding: 0.25rem 0;
	min-height: 44px;
	background: none;
	border: 0;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
	text-align: left;
}

.woocommerce-checkout #order_comments_field .bp-notes-toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.woocommerce-checkout #order_comments_field:not(.bp-notes-open) textarea {
	display: none;
}
