.rt-b24-modal[hidden] {
	display: none;
}

.rt-b24-modal {
	position: fixed;
	z-index: 99999;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 180ms ease, visibility 180ms ease;
	will-change: opacity;
}

.rt-b24-modal.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.rt-b24-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.58);
}

.rt-b24-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 620px);
	max-height: calc(100vh - 48px);
	overflow: auto;
	background: transparent;
	transform: translateY(10px) scale(0.985);
	transition: transform 180ms ease;
	will-change: transform;
}

.rt-b24-modal.is-open .rt-b24-modal__dialog {
	transform: translateY(0) scale(1);
}

.rt-b24-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 0;
	background: rgba(255, 255, 255, 0.92);
	color: var(--rt-dark);
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
}

.rt-b24-modal__close:hover,
.rt-b24-modal__close:focus-visible {
	color: var(--rt-red);
}

.rt-b24-modal__body {
	box-sizing: border-box;
	padding: 0;
	transition: min-height 180ms ease;
}

.rt-b24-modal__body.is-loading {
	position: relative;
	min-height: 420px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.rt-b24-modal__body.is-loading::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 34px;
	height: 34px;
	margin: -17px 0 0 -17px;
	border: 3px solid rgba(0, 0, 0, 0.12);
	border-top-color: var(--rt-yellow);
	border-radius: 50%;
	animation: rt-b24-spin 700ms linear infinite;
}

.rt-b24-modal .b24-form,
.rt-b24-modal .b24-form-wrapper,
.rt-b24-modal .b24-form-content,
.rt-b24-modal .b24-form-content form {
	min-height: 0 !important;
}

.rt-b24-modal .b24-form-wrapper {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

.rt-b24-modal .b24-form-state-container,
.rt-b24-modal .b24-form-success {
	min-height: 0 !important;
}

.rt-b24-modal-open {
	overflow: hidden;
}

@keyframes rt-b24-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 640px) {
	.rt-b24-modal {
		align-items: center;
		padding: 12px;
	}

	.rt-b24-modal__dialog {
		width: 100%;
		max-height: calc(100vh - 24px);
		overflow: auto;
	}

	.rt-b24-modal__body {
		padding: 0;
	}

	.rt-b24-modal__body.is-loading {
		min-height: 360px;
	}
}
