/* DPD Pickup guard — cart and checkout. */
body.woocommerce-cart .woocommerce-shipping-methods li:has(input[value^="wc_dpd_parcelshop"]),
body.woocommerce-checkout .woocommerce-shipping-methods li:has(input[value^="wc_dpd_parcelshop"]) {
	box-sizing: border-box;
	max-width: 100%;
	min-width: 0;
}

/*
 * WooCommerce shipping cards use a two-column grid: radio + label. DPD appends
 * its native widget as a third direct child, which would otherwise be
 * auto-placed into the 20px radio column and grow into a tall empty block.
 */
body.woocommerce-cart .cart_totals .woocommerce-shipping-methods li > .dpd-parcelshop-shipping-method-content,
body.woocommerce-checkout #order_review .woocommerce-shipping-methods li > .dpd-parcelshop-shipping-method-content,
body.woocommerce-checkout .woocommerce-checkout-review-order .woocommerce-shipping-methods li > .dpd-parcelshop-shipping-method-content {
	grid-column: 1 / -1 !important;
	grid-row: auto !important;
	justify-self: stretch;
	margin: 8px 0 0 !important;
	max-width: 100% !important;
	min-width: 0 !important;
	width: 100% !important;
}

body.woocommerce-cart .dpd-parcelshop-shipping-method-content,
body.woocommerce-checkout .dpd-parcelshop-shipping-method-content {
	background: #f5f8fc;
	border: 1px solid #d8e4ef;
	border-radius: 12px;
	box-sizing: border-box;
	clear: both;
	display: grid;
	gap: 10px;
	margin: 12px 0 2px;
	max-width: 100%;
	min-width: 0;
	overflow: visible;
	padding: 12px;
	width: 100%;
}

body.woocommerce-cart .dpd-parcelshop-shipping-method-content > *,
body.woocommerce-checkout .dpd-parcelshop-shipping-method-content > * {
	box-sizing: border-box;
	max-width: 100%;
	min-width: 0;
}

body.woocommerce-cart .ep-dpd-pickup-guidance,
body.woocommerce-checkout .ep-dpd-pickup-guidance {
	color: #76530b;
	font-size: 13px;
	font-weight: 750;
	line-height: 1.4;
	margin: 0;
}

body.woocommerce-cart .dpd-parcelshop-shipping-method-content__open-btn,
body.woocommerce-cart .js-dpd-parcelshop-map-widget-open-popup-btn,
body.woocommerce-cart .js-dpd-parcelshop-open-popup-btn,
body.woocommerce-checkout .dpd-parcelshop-shipping-method-content__open-btn,
body.woocommerce-checkout .js-dpd-parcelshop-map-widget-open-popup-btn,
body.woocommerce-checkout .js-dpd-parcelshop-open-popup-btn {
	align-items: center;
	background: #285899;
	border: 1px solid #285899;
	border-radius: 10px;
	box-sizing: border-box;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-size: 14px;
	font-weight: 800;
	justify-content: center;
	line-height: 1.25;
	max-width: 100%;
	min-height: 46px;
	padding: 10px 16px;
	text-align: center;
	text-decoration: none;
}

body.woocommerce-cart .dpd-parcelshop-shipping-method-content__open-btn:hover,
body.woocommerce-cart .dpd-parcelshop-shipping-method-content__open-btn:focus-visible,
body.woocommerce-cart .js-dpd-parcelshop-map-widget-open-popup-btn:hover,
body.woocommerce-cart .js-dpd-parcelshop-map-widget-open-popup-btn:focus-visible,
body.woocommerce-cart .js-dpd-parcelshop-open-popup-btn:hover,
body.woocommerce-cart .js-dpd-parcelshop-open-popup-btn:focus-visible,
body.woocommerce-checkout .dpd-parcelshop-shipping-method-content__open-btn:hover,
body.woocommerce-checkout .dpd-parcelshop-shipping-method-content__open-btn:focus-visible,
body.woocommerce-checkout .js-dpd-parcelshop-map-widget-open-popup-btn:hover,
body.woocommerce-checkout .js-dpd-parcelshop-map-widget-open-popup-btn:focus-visible,
body.woocommerce-checkout .js-dpd-parcelshop-open-popup-btn:hover,
body.woocommerce-checkout .js-dpd-parcelshop-open-popup-btn:focus-visible {
	background: #1c467e;
	border-color: #1c467e;
	color: #fff;
	outline: 3px solid rgba(40, 88, 153, .2);
	outline-offset: 2px;
}

body.woocommerce-cart .js-dpd-chosen-parcelshop-content:not(:empty),
body.woocommerce-checkout .js-dpd-chosen-parcelshop-content:not(:empty) {
	background: #eaf7f2;
	border: 1px solid #c7e9dc;
	border-radius: 9px;
	box-sizing: border-box;
	color: #126b57;
	font-size: 13px;
	line-height: 1.45;
	max-width: 100%;
	overflow-wrap: anywhere;
	padding: 10px 12px;
}

body.woocommerce-cart li.ep-dpd-pickup-missing .dpd-parcelshop-shipping-method-content,
body.woocommerce-checkout li.ep-dpd-pickup-missing .dpd-parcelshop-shipping-method-content {
	background: #fff9ea;
	border-color: #eed18b;
}

body.woocommerce-cart .ep-dpd-pickup-error,
body.woocommerce-checkout .ep-dpd-pickup-error {
	box-sizing: border-box;
	margin: 0 0 16px;
	max-width: 100%;
}

@media (max-width: 767px) {
	body.woocommerce-checkout .dpd-parcelshop-shipping-method-content__open-btn,
	body.woocommerce-cart .dpd-parcelshop-shipping-method-content__open-btn,
	body.woocommerce-cart .js-dpd-parcelshop-map-widget-open-popup-btn,
	body.woocommerce-cart .js-dpd-parcelshop-open-popup-btn,
	body.woocommerce-checkout .js-dpd-parcelshop-map-widget-open-popup-btn,
	body.woocommerce-checkout .js-dpd-parcelshop-open-popup-btn {
		width: 100%;
	}
}
