/* Vanilla modal for dedans_comms_popup and gallery overlays. */

.dedans-modal {
	position: fixed;
	inset: 0;
	z-index: 1050;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.dedans-modal.is-open {
	display: flex;
}

.dedans-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.dedans-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 720px;
	max-height: calc(100vh - 2rem);
	overflow: auto;
}

.dedans-modal__dialog--xl {
	max-width: 1140px;
}

.dedans-modal__content {
	background: #fff;
	border-radius: 0;
	padding: 0;
}

.dedans-modal__dialog--form {
	max-width: 500px;
}

.dedans-modal--forms .dedans-modal__close,
.dedans-modal .close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	cursor: pointer;
	border: 0;
	background: transparent;
}

.dedans-modal__header {
	display: flex;
	justify-content: flex-end;
}

.dedans-modal__body {
	display: flex;
	justify-content: center;
	text-align: center;
}

.dedans-modal__body .wrap {
	padding: 2rem;
}

.dedans-modal__footer {
	text-align: center;
}

body.dedans-modal-open {
	overflow: hidden;
}
