.bsffs-form {
	box-sizing: border-box;
	container-type: inline-size;
}

.bsffs-form *,
.bsffs-form *::before,
.bsffs-form *::after {
	box-sizing: inherit;
}

.bsffs-fields {
	display: grid;
}

.bsffs-layout-inline .bsffs-fields,
.bsffs-layout-auto .bsffs-fields {
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
}

.bsffs-email-field input {
	width: 100%;
}

.bsffs-honeypot,
.bsffs-form .screen-reader-text,
.bsffs-popup .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.bsffs-popup {
	box-sizing: border-box;
	width: min(calc(100% - 2rem), var(--bsffs-popup-width, 560px));
	max-width: none;
	max-height: calc(100dvh - 2rem);
}

.bsffs-popup:not([open]) {
	display: none;
}

.bsffs-popup.bsffs-popup-fallback[open] {
	position: fixed;
	z-index: 100000;
	inset: 0;
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	max-height: none;
	padding: 1rem;
}

.bsffs-popup-panel {
	max-height: calc(100dvh - 2rem);
	overflow: auto;
}

.bsffs-popup-fallback .bsffs-popup-panel {
	width: min(100%, var(--bsffs-popup-width, 560px));
}

.bsffs-popup-actions {
	display: flex;
	justify-content: flex-end;
}

.bsffs-popup-close {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
}

.bsffs-popup-open {
	overflow: hidden;
}

@container (max-width: 30rem) {

	.bsffs-layout-inline .bsffs-fields,
	.bsffs-layout-auto .bsffs-fields {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {

	.bsffs-layout-inline .bsffs-fields,
	.bsffs-layout-auto .bsffs-fields {
		grid-template-columns: 1fr;
	}
}
