.modal {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1055;
	display: none;
	width: 100%;
	height: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	outline: 0;
}
#login-form-modal {
	top: 1rem;
	padding-inline: 0.25rem;
}
.fade {
	transition: opacity 0.15s linear;
}
.fade:not(.show) {
	opacity: 0;
}
.modal-dialog {
	position: relative;
	width: auto;
	margin: 0.5rem;
	pointer-events: none;
}
.modal.fade .modal-dialog {
	transition: transform 0.3s ease-out;
	transform: translate(0, -50px);
}
.modal.show .modal-dialog {
	transform: none;
}

.modal-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1050;
	width: 100vw;
	height: 100vh;
	background-color: #000;
}
.modal-backdrop.fade {
	opacity: 0;
}
.modal-backdrop.show {
	opacity: 0.5;
}

.modal-dialog-scrollable {
	height: calc(100% - 1rem);
}
.modal-dialog-scrollable .modal-content {
	max-height: 100%;
	overflow: hidden;
}
.modal-dialog-scrollable .modal-body {
	overflow-y: auto;
}

.modal-content {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	pointer-events: auto;
	background-color: #fff;
	background-clip: padding-box;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: var(--radius);
	outline: 0;
}

.modal-header {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1rem;
	border-bottom: 1px solid #dee2e6;
	border-top-left-radius: calc(0.3rem - 1px);
	border-top-right-radius: calc(0.3rem - 1px);
}
.modal-header .btn-close {
	padding: 0.5rem 0.5rem;
	margin: -0.5rem -0.5rem -0.5rem auto;
}
.modal-title {
	margin-bottom: 0;
	line-height: 1.5;
}
.modal-body {
	position: relative;
	flex: 1 1 auto;
	padding: 1rem;
}
.modal-footer {
	display: flex;
	flex-wrap: wrap;
	flex-shrink: 0;
	align-items: center;
	justify-content: flex-end;
	padding: 0.75rem;
	border-top: 1px solid #dee2e6;
	border-bottom-right-radius: calc(0.3rem - 1px);
	border-bottom-left-radius: calc(0.3rem - 1px);
}
.modal-footer > * {
	margin: 0.25rem;
}

#product-detail-container .modal,
.missing-combos-modal-container {
	z-index: 1070;
}
#recipe-detail-container .modal {
	z-index: 1075;
}
#recipe-product-detail-container .modal {
	z-index: 1080;
}
h4.modal-title {
	margin-block: 0;
	font-size: var(--fs);
}
.modal-content button.share-item-link,
.modal-content button.edit-recipe-btn,
.modal-content button.get-more-suggestions,
.modal-content #scanner-header .slot button {
	margin-inline: 1rem;
}
.modal-body-container {
	display: flex;
	flex-flow: row wrap;
	gap: 1rem;
}
.modal-body-container > * {
	flex: 1 1 100%;
}
.modal-footer {
	gap: 0.5rem;
	padding: 1rem;
}
.modal-footer > * {
	margin: 0;
}
.modal-dialog .modal-xxl /* product detail, cart */ {
	max-width: 100% !important;
}

#fgtn-pwd .modal-dialog-scrollable {
	height: calc(100% - 9rem);
	margin-top: 8rem;
}

/* scanner > */
#scanner.scan-success .slot {
	display: none;
}
#scanner #result .product-card {
	max-width: 328px;
}
#scanner #result .radio-buttons {
	padding-top: 1rem;
}
/* < scanner */

/* generator warning > */
.missing-combos-modal-container .modal-content {
	height: 100%;
}
#missing-combos-header {
	background-color: var(--wrnng);
}
#missing-combos-header h4 {
	color: var(--wrnng-text);
}
#missing-combos-footer > div {
	display: flex;
	flex: 1;
	flex-flow: row wrap;
	justify-content: space-between;
	align-items: center;
}
.missing-combos-help {
	font-size: 0.9rem;
	font-weight: 500;
}
/* < generator warning */

/* sm */
@media (min-width: 576px) {
	.modal-dialog {
		max-width: 500px;
		margin: 1.75rem auto;
	}
	.modal-dialog-scrollable {
		height: calc(100% - 3.5rem);
	}
	.modal-dialog-centered {
		min-height: calc(100% - 3.5rem);
	}
	.modal-sm {
		max-width: 300px;
	}
	.modal-xxl {
		min-width: 560px;
		width: calc(75vw + 128px);
		max-width: 1500px;
	}
	#product-detail-container .modal-xxl {
		max-width: 1250px;
	}
	h4.modal-title {
		font-size: 1rem;
	}
}
/* md */
@media (min-width: 768px) {
	.modal-dialog.modal-xxl {
		max-width: min(90vw, 1200px) !important;
	}
}
/* lg */
@media (min-width: 992px) {
	.modal-lg,
	.modal-xl {
		max-width: 800px;
	}
}
/* xl */
@media (min-width: 1200px) {
	.modal-xl {
		max-width: 1140px;
	}
}
