/* Fuse Phone, Address and Date / Time WPForms fields. Rows, columns and sublabels come from WPForms' own CSS. */

.wpforms-container .fuse-datetime input[type="date"],
.wpforms-container .fuse-datetime select,
.wpforms-container .fuse-address select {
	width: 100%;
	max-width: 100%;
}

.wpforms-container .fuse-datetime input[type="date"] {
	cursor: pointer;
}

/* Dropdowns sit beside text inputs: match the theme's input height (WPForms' own select is shorter). */
.wpforms-container .fuse-address select,
.wpforms-container .fuse-datetime select {
	height: var(--fuse-control-height, 3.125rem);
	min-height: var(--fuse-control-height, 3.125rem);
}

/* A part alone on its line spans the full width (WPForms leaves 10px on the right). */
.wpforms-container .fuse-address .wpforms-field-row > .wpforms-field-row-block:only-child,
.wpforms-container .fuse-datetime .wpforms-field-row > .wpforms-field-row-block:only-child {
	padding-right: 0;
	padding-inline-end: 0;
}

.wpforms-container .fuse-datetime input[type="date"]::-webkit-calendar-picker-indicator {
	cursor: pointer;
}

/*
 * City, State and ZIP: on narrow forms City takes a line, State and ZIP share the next. The queries are
 * unnamed because WPForms' modern CSS renames this row's container (wpforms-field-row-responsive).
 */
.wpforms-container .fuse-address .wpforms-field-row.fuse-address-region {
	flex-wrap: wrap;
	container-type: inline-size;
}

@container (max-width: 420px) {
	.wpforms-container .fuse-address .fuse-address-region > .wpforms-one-third:first-child {
		width: 100%;
		padding: 0;
		margin-bottom: 15px;
	}

	.wpforms-container .fuse-address .fuse-address-region > .wpforms-one-third:not(:first-child) {
		width: 50%;
	}

	.wpforms-container .fuse-address .fuse-address-region > .wpforms-one-third:nth-child(2) {
		padding-inline-start: 0;
	}
}

@container (max-width: 260px) {
	.wpforms-container .fuse-address .fuse-address-region > .wpforms-field-row-block {
		width: 100%;
		padding: 0;
	}

	.wpforms-container .fuse-address .fuse-address-region > .wpforms-field-row-block:not(:last-child) {
		margin-bottom: 15px;
	}
}
