// ============================================================
// Osmo — Basic Modal Setup
// data-* must not be renamed. Visual overrides for discovery
// live in layout/_discovery-modal.scss.
// ============================================================

.modal {
	z-index: var(--z-modal);
	opacity: 0;
	pointer-events: none;
	visibility: hidden;
	justify-content: center;
	align-items: center;
	padding: 2em 1em;
	display: flex;
	position: fixed;
	inset: 0;
	overflow: hidden;
	transition: all 0.2s linear;
}

.modal[data-modal-group-status='active'] {
	opacity: 1;
	visibility: visible;
}

.modal__dark {
	opacity: 0.5;
	pointer-events: auto;
	cursor: pointer;
	background-color: #131313;
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
}

.modal__card {
	pointer-events: auto;
	background-color: #efeeec;
	border-radius: 2em;
	width: 100%;
	max-width: 54em;
	max-height: 100%;
	padding: 0.75em;
	display: none;
	position: relative;
}

.modal__card[data-modal-status='active'] {
	display: flex;
}

.modal__scroll {
	grid-column-gap: 1.5em;
	grid-row-gap: 1.5em;
	background-color: #e2e1df;
	border-radius: 1.25em;
	flex-flow: column;
	width: 100%;
	max-height: 100%;
	display: flex;
	position: relative;
	overflow: scroll;
}

.modal__content {
	grid-column-gap: 1.5em;
	grid-row-gap: 1.5em;
	flex-flow: column;
	padding: 2em;
	display: flex;
}

.modal__h2 {
	margin-top: 0;
	margin-bottom: 0;
	font-weight: 500;
	line-height: 1.175;
}

.modal__p {
	margin-bottom: 0;
	line-height: 1.5;
}

.modal__btn-close {
	background-color: #efeeec;
	border-radius: 50%;
	justify-content: center;
	align-items: center;
	width: 3.5em;
	height: 3.5em;
	display: flex;
	position: absolute;
	top: 2.5em;
	right: 2.5em;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: inherit;
}

.modal__btn-close-bar {
	background-color: currentColor;
	width: 0.125em;
	height: 40%;
	position: absolute;
	transform: rotate(45deg);
}

.modal__btn-close-bar.is--second {
	transform: rotate(-45deg);
}
