/**
 * Delivery postcode checker.
 *
 * The surrounding box (border, radius, padding) is applied in the page builder,
 * not here - this stylesheet draws no container of its own.
 *
 * The button mirrors the theme's us-btn-style_7 geometry (padding 1em 1.8em,
 * radius 4em, weight 700, h1 font family) but keeps a black fill rather than
 * the theme's green gradient.
 */

.bwda-checker {
	margin: 0;
	background: transparent;
}

.bwda-checker__label {
	display: block;
	margin-bottom: 0.6em;
	font-family: var( --h1-font-family, inherit );
	font-weight: 700;
	line-height: 1.3;
}

.bwda-checker__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
	align-items: stretch;
}

.bwda-checker__input {
	flex: 1 1 10em;
	min-width: 0;
	margin: 0;
	font: inherit;
	text-transform: uppercase;
}

.bwda-checker__input::placeholder {
	text-transform: none;
	opacity: 0.6;
}

/* Mirrors us-btn-style_7 geometry so it sits level with the theme's buttons. */
.bwda-checker__button {
	flex: 0 0 auto;
	margin: 0;
	padding: 1em 1.8em;
	border: 0;
	border-radius: 4em;
	min-height: calc( 1.2em + 2em );
	font-family: var( --h1-font-family, inherit );
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	text-align: center;
	cursor: pointer;
	background: #1a1a1a;
	color: #fff;
	transition: background 0.3s ease, opacity 0.3s ease;
}

.bwda-checker__button:hover,
.bwda-checker__button:focus-visible {
	background: #000;
	color: #fff;
}

.bwda-checker__button[disabled] {
	opacity: 0.55;
	cursor: default;
}

.bwda-checker__result:not( :empty ) {
	margin-top: 1em;
}

.bwda-result {
	margin: 0;
	padding: 0.75em 1em;
	border-left: 4px solid transparent;
	border-radius: 0.5rem;
	line-height: 1.45;
	font-size: 0.95em;
}

.bwda-result--yes {
	border-left-color: var( --color-content-primary, #6fa12e );
	background: rgba( 111, 161, 46, 0.1 );
	color: #3f6b16;
}

.bwda-result--no,
.bwda-result--error {
	border-left-color: #c62828;
	background: rgba( 198, 40, 40, 0.08 );
	color: #8e1f1f;
}

.bwda-result--unknown,
.bwda-result--checking {
	border-left-color: rgba( 0, 0, 0, 0.3 );
	background: rgba( 0, 0, 0, 0.05 );
}

/* Keep the result text readable on the theme's dark sections. */
.color_dark .bwda-result--yes,
.color_dark .bwda-result--no,
.color_dark .bwda-result--error {
	color: inherit;
}

/* Delivery status row injected into the cart / checkout totals table. */
.bwda-delivery-status > td {
	padding-top: 0;
}

.bwda-delivery-status .bwda-result {
	margin: 0 0 0.5em;
}
