/* BCTFW Checkout Blocks layout styles moved from JS */
#billing.bctfw-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	row-gap: 0;
	column-gap: 16px;
}

/* Optional tweak for country select alignment in some themes */
.wc-block-checkout__form .wc-block-components-address-form__country .wc-blocks-components-select {
	margin-top: 16px !important;
}

/* Native date input restyling to match WC Blocks text-input look */
#billing-fields .wc-block-components-text-input input[type=date] {
	appearance: none;
	border: 1px solid hsla(0, 0%, 7%, .8);
	border-radius: 4px;
	color: #2b2d2f;
	font-family: inherit;
	font-size: 1em;
	font-style: inherit;
	font-weight: inherit;
	height: 100%;
	letter-spacing: inherit;
	padding: 1em .5em 0;
	text-decoration: inherit;
	text-transform: inherit;
	width: 100%;
}

#billing-fields .wc-block-components-text-input.has-error input[type=date] {
	height: 80%;
}

#billing-fields .wc-block-components-text-input.has-error {
	padding-bottom: 15px;
}

#billing-fields .wc-block-components-text-input input[type=date] ~ label {
	color: #2b2d2f;
	font-family: inherit;
	font-size: 1em;
	font-style: inherit;
	font-weight: inherit;
	left: .5em;
	letter-spacing: inherit;
	margin: 0;
	max-width: calc(100% - 32px);
	overflow: hidden;
	position: absolute;
	text-decoration: inherit;
	text-overflow: ellipsis;
	text-transform: inherit;
	top: 2px;
	transform: translateY(15%) scale(.75);
	transform-origin: top left;
	transition: all .2s ease;
	white-space: nowrap;
	z-index: 1;
}

#billing-fields .wc-blocks-components-select,
#billing-fields .wc-block-components-text-input.wc-block-components-address-form__bctfw-birthdate {
	margin-top: 15px;
}

@media (max-width: 782px) {
	#billing.bctfw-grid {
	grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

/* Theme fixes */
/* Twenty four fixes */
.theme-twentytwentyfour #billing-fields .wc-block-components-text-input input[type=date] {
	height: auto;
	padding: 1.3em .5em 0.25em;
	width:-webkit-fill-available
}

/* Twenty five fixes */
.theme-twentytwentyfive #billing-fields .wc-block-components-text-input input[type=date] {
	height: auto;
	padding: 1.3em .5em 0.25em;
	width:-webkit-fill-available
}

/* Twenty three fixes */
.theme-twentytwentythree#billing-fields .wc-block-components-text-input input[type=date] {
	height: auto;
	padding: 1.3em .5em 0.25em;
	width:-webkit-fill-available
}

/* Twenty one fixes */
.theme-twentytwentyone #billing-fields .wc-block-components-text-input input[type=date] {
	height: auto;
	padding: 0.5em .5em 0.25em;
	width:-webkit-fill-available
}

/* Astra fixes */
.wp-block-woocommerce-checkout .wc-block-components-text-input.is-active label {
	top: 4px;
}