.cetech-de-product-delivery-selector {
	margin: 1em 0;
	width: 100%;
	max-width: 100%;
	container: cetech-delivery-selector / inline-size;
	overflow: visible;
	padding: 1rem;
	border: 1px solid rgba(0, 0, 0, 0.16);
	border-radius: 0.5rem;
	background: #fff;
	box-sizing: border-box;
	min-width: 0;
	overflow-wrap: anywhere;
	line-height: 1.5;
	--cetech-de-delivery-fee-accent: var(--wp--preset--color--primary, var(--woocommerce, currentColor));
}

.cetech-de-matching-location,
.cetech-de-fulfilment-choice,
.cetech-de-delivery-option-group {
	max-width: 100%;
}

.cetech-de-delivery-selector__fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.cetech-de-delivery-selector__title {
	margin: 0 0 0.75em;
	font-size: 1.05em;
	font-weight: 700;
}

.cetech-de-matching-location__prompt {
	margin: 0 0 0.5em;
	font-weight: 600;
}

.cetech-de-delivery-options {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cetech-de-delivery-option {
	margin: 0.5em 0;
}

.cetech-de-delivery-options > .cetech-de-delivery-option {
	padding: 0.75rem;
	border: 1px solid rgba(0, 0, 0, 0.16);
	border-radius: 0.5rem;
}

.cetech-de-delivery-option--card {
	margin: 0.5em 0;
}

.cetech-de-delivery-option__label-wrap,
.cetech-de-delivery-option--card label {
	display: flex;
	align-items: flex-start;
	gap: 0.65em;
	cursor: pointer;
	padding: 0.75rem;
	border: 1px solid rgba(0, 0, 0, 0.16);
	border-radius: 0.5rem;
	background: #fff;
	min-height: 2.75rem;
	box-sizing: border-box;
}

.cetech-de-delivery-option__label-wrap input[type="radio"],
.cetech-de-delivery-option--card input[type="radio"] {
	margin-block: 0.3em 0;
	margin-inline: 0;
	flex: 0 0 auto;
}

.cetech-de-delivery-option__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.25em 0.75em;
	min-width: 0;
	width: 100%;
}

.cetech-de-delivery-option__headline {
	display: block;
	min-width: 0;
}

.cetech-de-delivery-option__label {
	display: block;
	grid-column: 1;
	grid-row: 1;
	font-weight: 600;
	line-height: 1.35;
	min-width: 0;
}

.cetech-de-delivery-option__price {
	display: block;
	margin-inline-start: 0;
	grid-column: 1;
	grid-row: auto;
	font-weight: 700;
	font-size: 1em;
	line-height: 1.35;
	color: var(--cetech-de-delivery-fee-accent, currentColor);
}

.cetech-de-delivery-option__estimate,
.cetech-de-delivery-option__meta {
	display: block;
	grid-column: 1 / -1;
	font-weight: 400;
	font-size: 0.95em;
	line-height: 1.5;
}

.cetech-de-delivery-option__unavailable-reason {
	display: block;
	margin-top: 0.25em;
	font-size: 0.9em;
}

.cetech-de-delivery-option--unavailable,
.cetech-de-delivery-options > .cetech-de-delivery-option--unavailable {
	border-style: dashed;
}

.cetech-de-delivery-option__label-wrap input:focus-visible,
.cetech-de-fulfilment-choice input:focus-visible,
.cetech-de-matching-location :focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 3px;
}

@supports selector(label:has(input:checked)) {
	.cetech-de-delivery-option__label-wrap:has(input:checked),
	.cetech-de-delivery-option--card label:has(input:checked),
	.cetech-de-fulfilment-choice__option label:has(input:checked) {
		border-color: #2271b1;
		box-shadow: inset 0 0 0 1px #2271b1;
	}

	.cetech-de-delivery-option__label-wrap:has(input:disabled),
	.cetech-de-delivery-option--card label:has(input:disabled) {
		cursor: not-allowed;
		border-style: dashed;
	}

	.cetech-de-delivery-option--card label:has(input:focus-visible),
	.cetech-de-fulfilment-choice__option label:has(input:focus-visible) {
		outline: 2px solid #2271b1;
		outline-offset: 3px;
	}
}

.cetech-de-fulfilment-choice {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 0.85em;
}

.cetech-de-fulfilment-choice__option {
	margin: 0;
}

.cetech-de-fulfilment-choice__option label {
	display: flex;
	align-items: center;
	gap: 0.4em;
	min-height: 2.75rem;
	padding: 0.4rem 0.75rem;
	border: 1px solid rgba(0, 0, 0, 0.16);
	border-radius: 0.5rem;
	box-sizing: border-box;
	cursor: pointer;
}

.cetech-de-delivery-option-group[hidden],
.cetech-de-delivery-selector__location[hidden],
[data-cetech-de-active-choice="store_pickup"] [data-cetech-de-location-panel],
[data-cetech-de-active-choice=""] [data-cetech-de-location-panel],
.cetech-de-matching-location [hidden],
.cetech-de-matching-location [data-cetech-de-reveal][hidden] {
	display: none !important;
}

/* D2: an unconfigured choice stays visible but disabled, with its reason beneath the switch. */
.cetech-de-fulfilment-choice__option--unavailable label {
	cursor: not-allowed;
	border-style: dashed;
	opacity: 0.7;
}

.cetech-de-fulfilment-choice__note {
	margin: -0.35em 0 0.85em;
	font-size: 0.92em;
	line-height: 1.4;
}

/* D2: after a card is chosen the chooser collapses to one compact line with a single Change control. */
.cetech-de-delivery-selection {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35em 0.75em;
	margin: 0 0 0.75em;
	padding: 0.6rem 0.75rem;
	border: 1px solid #2271b1;
	border-radius: 0.5rem;
	line-height: 1.5;
}

.cetech-de-delivery-selection[hidden] {
	display: none !important;
}

.cetech-de-delivery-selection__text {
	flex: 1 1 12rem;
	min-width: 0;
	font-weight: 600;
}

.cetech-de-delivery-selection__change {
	flex: 0 0 auto;
	min-height: 2.75rem;
	padding: 0.4rem 0.9rem;
	border: 1px solid currentColor;
	border-radius: 0.5rem;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.cetech-de-delivery-selection__change:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 3px;
}

[data-cetech-de-collapsed="1"] > [data-cetech-de-location-panel],
[data-cetech-de-collapsed="1"] > [data-cetech-de-status],
[data-cetech-de-collapsed="1"] [data-cetech-de-options] > :not([data-cetech-de-choice-note]) {
	display: none !important;
}

.cetech-de-delivery-option-group--pickup {
	padding-top: 0.25em;
}

.cetech-de-delivery-option-group__heading {
	margin: 0 0 0.4em;
	font-weight: 700;
}

.cetech-de-pickup-details {
	margin-block: 0.35em 0.85em;
	margin-inline: 1.65em 0;
}

.cetech-de-pickup-details__row {
	margin: 0.25em 0;
	font-size: 0.92em;
	line-height: 1.4;
}

.cetech-de-pickup-details__label {
	font-weight: 600;
}

.cetech-de-product-delivery-selector--variable {
	margin: 1em 0;
}

.cetech-de-delivery-selector__status {
	margin: 0.5em 0;
	padding: 0.6rem 0.75rem;
	border-inline-start: 3px solid #646970;
	background: #f6f7f7;
	border-radius: 0.25rem;
	line-height: 1.5;
}

.cetech-de-delivery-selector__status:empty {
	display: none;
}

.cetech-de-delivery-selector__status[data-state="error"],
.cetech-de-delivery-selector__status[data-state="unavailable"] {
	font-weight: 600;
	border-inline-start-color: #b32d2e;
}

.cetech-de-matching-location {
	margin: 0 0 0.65em;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.45rem 0.75rem;
	align-items: end;
	border: 0;
	padding: 0;
	min-width: 0;
}

.cetech-de-matching-location__intro,
.cetech-de-matching-location__prompt,
.cetech-de-matching-location legend {
	grid-column: 1 / -1;
}

.cetech-de-matching-location__field,
.cetech-de-matching-location .form-row,
.cetech-de-matching-location p.form-row {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	clear: none !important;
	margin: 0 !important;
	padding: 0;
	box-sizing: border-box;
}

.cetech-de-matching-location__intro {
	margin: 0 0 0.5em;
}

.cetech-de-matching-location select,
.cetech-de-matching-location input[type="text"],
.cetech-de-matching-location input[type="search"],
.cetech-de-matching-location .form-row input,
.cetech-de-matching-location .form-row select {
	min-height: 2.75rem;
	width: 100% !important;
	max-width: 100%;
	box-sizing: border-box;
}

.cetech-de-locality-results {
	list-style: none;
	margin: 0.15rem 0 0;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.12);
	max-height: 12rem;
	overflow: auto;
	background: #fff;
	border-radius: 0.25rem;
	box-sizing: border-box;
	grid-column: 1 / -1;
}

.cetech-de-locality-results [role="option"] {
	padding: 0.6rem 0.75rem;
	min-height: 2.75rem;
	box-sizing: border-box;
	cursor: pointer;
}

.cetech-de-locality-results [role="option"]:focus,
.cetech-de-locality-results [role="option"]:hover {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

.cetech-de-delivery-selector__location {
	margin: 0 0 0.5em;
}

@media (max-width: 600px) {
	.cetech-de-matching-location {
		grid-template-columns: 1fr;
	}

	.cetech-de-product-delivery-selector {
		padding: 0.5rem 0;
		border: 0;
		background: transparent;
	}

	.cetech-de-delivery-option-group,
	.cetech-de-fulfilment-choice {
		padding: 0;
		border: 0;
	}
}

@media (max-width: 768px) {
	.cetech-de-product-delivery-selector {
		padding: 0.75rem 0;
	}
}

@media (max-width: 480px) {
	.cetech-de-fulfilment-choice__option {
		flex: 1 1 8rem;
	}
}

@media (forced-colors: active) {
	.cetech-de-delivery-option__label-wrap,
	.cetech-de-delivery-option--card label,
	.cetech-de-fulfilment-choice__option label {
		box-shadow: none;
	}
}

/* Keep embedded theme columns stacked; enhance only when the selector itself has room. */
@container cetech-delivery-selector (min-width: 26rem) {
	.cetech-de-matching-location {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.cetech-de-delivery-option__body {
		grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
	}

	.cetech-de-delivery-option__label {
		grid-column: 1 / -1;
	}

	.cetech-de-delivery-option__body:has(.cetech-de-delivery-option__price) .cetech-de-delivery-option__label {
		grid-column: 1;
	}

	.cetech-de-delivery-option__price {
		grid-column: 2;
		grid-row: 1;
		text-align: end;
	}
}
