.mszd-zip-banner {
	position: relative;
	display: block;
	z-index: 2;
	width: 100%;
	margin: 0;
	top: auto;
	border-bottom: 1px solid rgba(26, 37, 51, 0.1);
	background: #f7f9fb;
	color: #1f2933;
	font-size: 13px;
	line-height: 1.35;
	box-shadow: 0 1px 0 rgba(26, 37, 51, 0.03);
}

/* Woodmart removes header-banner-display when its close button is clicked, so offset only while that banner is visible. */
body.header-banner-enabled .header-banner {
	z-index: 1;
}

body.header-banner-enabled.header-banner-display .mszd-zip-banner {
	top: var(--wd-header-banner-h, 40px);
}

.mszd-zip-banner [hidden] {
	display: none !important;
}

.mszd-zip-banner__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	align-items: center;
	justify-content: center;
	max-width: 1200px;
	margin: 0 auto;
	padding: 4px 16px;
}

.mszd-zip-banner__message {
	max-width: 100%;
}

.mszd-zip-banner__form,
.mszd-zip-banner__actions {
	display: inline-flex;
	flex: 0 1 auto;
	flex-wrap: nowrap;
	width: auto;
	max-width: 100%;
	gap: 5px;
	align-items: center;
	justify-content: center;
}

.mszd-zip-banner__input {
	box-sizing: border-box;
	width: 220px;
	max-width: 100%;
	height: 30px !important;
	min-height: 30px !important;
	padding: 4px 8px;
	border: 1px solid #cbd5df;
	border-radius: 6px;
	background: #ffffff;
	color: #1f2933;
	font-size: 13px;
	line-height: normal;
	box-shadow: inset 0 1px 2px rgba(26, 37, 51, 0.04);
}

.mszd-zip-banner__input:focus {
	border-color: #5b7894;
	outline: 2px solid rgba(91, 120, 148, 0.18);
	outline-offset: 0;
}

.mszd-zip-banner__button,
.mszd-zip-banner button {
	box-sizing: border-box;
	height: 30px;
	min-height: 30px;
	padding: 4px 12px;
	border: 0;
	border-radius: 6px;
	background: #4a4444;
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	line-height: normal;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mszd-zip-banner__button:hover,
.mszd-zip-banner__button:focus,
.mszd-zip-banner button:hover,
.mszd-zip-banner button:focus {
	background: #3d3838;
	color: #ffffff;
}

.mszd-zip-banner__button--link {
	border: 0;
	background: #4a4444;
	color: #ffffff;
	height: 30px !important;
	min-height: 30px !important;
	line-height: normal;
}

.mszd-zip-banner__button--link:hover,
.mszd-zip-banner__button--link:focus {
	background: #3d3838;
	color: #ffffff;
}

.mszd-zip-banner--confirmed {
	background: #ffffff;
}

.mszd-zip-banner--detected {
	border-bottom-color: rgba(49, 95, 135, 0.18);
	background: #eef6fb;
}

.mszd-zip-banner--manual,
.mszd-zip-banner--not-detected {
	background: #f7f9fb;
}

.mszd-zip-banner--abroad {
	border-bottom-color: rgba(115, 117, 121, 0.2);
	background: #f4f5f6;
}

.mszd-widget {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 10px 0;
}

.mszd-badge,
.mszd-delivery-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	max-width: 100%;
	min-height: 30px;
	padding: 5px 10px;
	border: 1px solid #cbd5df;
	border-radius: 999px;
	background: #eef3f7;
	color: #35495c;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	vertical-align: middle;
}

.mszd-state-check_delivery {
	border-color: #cbd5df;
	background: #eef3f7;
	color: #35495c;
}

.mszd-state-free_delivery {
	border-color: #72b486;
	background: #e8f7ec;
	color: #176334;
}

.mszd-state-quote_required {
	border-color: #d8c37f;
	background: #fbf4dc;
	color: #705b19;
}

.mszd-state-abroad_delivery {
	border-color: #d1d6dc;
	background: #f1f3f5;
	color: #555f6b;
}

.mszd-badge--loading {
	border-color: #cbd5df;
	background: #f7f9fb;
	color: #6b7682;
}

/* Product-card badges are image overlays; badges still hydrate independently through REST. */
.product-element-top .mszd-widget {
	position: absolute;
	top: 8px;
	inset-inline-end: 8px;
	z-index: 5;
	display: block;
	width: auto;
	max-width: calc(100% - 16px);
	margin: 0;
	pointer-events: none;
}

.product-element-top .mszd-badge {
	width: auto;
	max-width: 100%;
	min-height: 0;
	padding: 4px 8px;
	border-radius: 999px;
	font-size: 12px;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: normal;
	box-shadow: 0 1px 4px rgba(26, 37, 51, 0.12);
}

.mszd-form {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: stretch;
}

.mszd-input {
	width: 118px;
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid #cbd5df;
	border-radius: 6px;
	background: #ffffff;
	color: #1f2933;
	font-size: 14px;
	line-height: 1.2;
}

.mszd-input:focus {
	border-color: #5b7894;
	outline: 2px solid rgba(91, 120, 148, 0.18);
	outline-offset: 0;
}

.mszd-button {
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid #1f2933;
	border-radius: 6px;
	background: #1f2933;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.mszd-button:hover,
.mszd-button:focus {
	border-color: #334556;
	background: #334556;
	color: #ffffff;
}

.mszd-single-delivery-block {
	display: block;
	width: auto;
	max-width: 100%;
	margin: 4px 0 10px;
	padding: 0;
	border: 0;
	background: transparent;
}

.mszd-single-delivery-block__title {
	color: #35495c;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
}

.mszd-single-delivery-block--check_delivery {
	background: transparent;
}

.mszd-single-delivery-block--free_delivery {
	background: transparent;
}

.mszd-single-delivery-block--free_delivery .mszd-single-delivery-block__title {
	color: #176334;
}

.mszd-single-delivery-block--quote_required {
	background: transparent;
}

.mszd-single-delivery-block--quote_required .mszd-single-delivery-block__title {
	color: #705b19;
}

.mszd-single-delivery-block--abroad_delivery {
	background: transparent;
}

.mszd-single-delivery-block--abroad_delivery .mszd-single-delivery-block__title {
	color: #555f6b;
}

.mszd-cart-delivery-status,
.mszd-checkout-delivery-status {
	display: inline-flex;
	align-items: center;
	width: auto;
	max-width: 100%;
	margin-top: 6px;
	padding: 3px 8px;
	border-radius: 999px;
	background: #eef3f7;
	color: #35495c;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
}

.woocommerce-cart .mszd-cart-delivery-status {
	display: block;
	width: fit-content;
	margin-top: 6px;
	margin-bottom: 8px;
}

.woocommerce-checkout .mszd-checkout-delivery-status,
body.woocommerce-checkout .mszd-checkout-delivery-status,
.woocommerce-checkout-review-order .mszd-checkout-delivery-status {
	display: inline-flex !important;
	flex: 0 0 auto;
	align-items: center;
	align-self: flex-start;
	width: fit-content !important;
	max-width: 100%;
	margin-top: 4px;
	margin-bottom: 0;
}

.mszd-mini-cart-delivery-status {
	display: block;
	width: fit-content;
	max-width: 100%;
	margin-top: 4px;
	padding: 3px 7px;
	border-radius: 999px;
	background: #eef3f7;
	color: #35495c;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
}

.mszd-cart-delivery-status--free_delivery,
.mszd-checkout-delivery-status--free_delivery,
.mszd-mini-cart-delivery-status--free_delivery {
	background: #e8f7ec;
	color: #176334;
}

.mszd-cart-delivery-status--quote_required,
.mszd-checkout-delivery-status--quote_required,
.mszd-mini-cart-delivery-status--quote_required {
	background: #fbf4dc;
	color: #705b19;
}

.mszd-cart-delivery-status--abroad_delivery,
.mszd-checkout-delivery-status--abroad_delivery,
.mszd-mini-cart-delivery-status--abroad_delivery {
	background: #f1f3f5;
	color: #555f6b;
}

.mszd-mini-cart-delivery-status--check_delivery {
	background: #eef3f7;
	color: #35495c;
}

.mszd-cart-delivery-notice,
.mszd-checkout-delivery-notice {
	margin-bottom: 16px;
	border-color: rgba(216, 195, 127, 0.75);
	background-color: #fbf4dc;
	color: #4d421c;
}

@media (max-width: 600px) {
	.mszd-zip-banner__inner {
		align-items: center;
		gap: 5px 8px;
		padding: 5px 12px;
	}

	.mszd-zip-banner__form {
		flex: 1 1 220px;
		width: auto;
		max-width: 100%;
		flex-wrap: nowrap;
	}

	.mszd-zip-banner__actions {
		flex: 0 1 auto;
		width: auto;
		max-width: 100%;
		flex-wrap: wrap;
	}

	.mszd-zip-banner__input {
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
	}

	.mszd-zip-banner__button {
		flex: 0 0 auto;
	}

	.mszd-widget,
	.mszd-form {
		width: 100%;
	}

	.mszd-badge,
	.mszd-delivery-badge,
	.mszd-input,
	.mszd-button {
		width: 100%;
		justify-content: center;
	}
}
