.spbn-popup[hidden] {
	display: none !important;
}

body.spbn-popup-open {
	overflow: hidden;
}

.spbn-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 24px;
	color: var(--spbn-text);
	font-family: inherit;
}

.spbn-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgb(20 17 14 / 68%);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 180ms ease;
}

.spbn-popup__dialog {
	position: relative;
	width: min(100%, 560px);
	box-sizing: border-box;
	padding: 42px;
	border: 1px solid rgb(0 0 0 / 10%);
	border-radius: 18px;
	background: var(--spbn-background);
	box-shadow: 0 24px 80px rgb(0 0 0 / 28%);
	color: var(--spbn-text);
	opacity: 0;
	transform: translateY(16px) scale(0.98);
	transition: opacity 180ms ease, transform 180ms ease;
}

.spbn-popup--visible .spbn-popup__backdrop,
.spbn-popup--visible .spbn-popup__dialog {
	opacity: 1;
}

.spbn-popup--visible .spbn-popup__dialog {
	transform: translateY(0) scale(1);
}

.spbn-popup__close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font: 400 30px/36px Georgia, serif;
	cursor: pointer;
	opacity: 0.64;
}

.spbn-popup__close:hover {
	opacity: 1;
}

.spbn-popup__title {
	margin: 0 44px 14px 0;
	color: inherit;
	font: inherit;
	font-size: clamp(1.4rem, 3vw, 1.8rem);
	font-weight: 700;
	line-height: 1.2;
}

.spbn-popup__message {
	margin: 0;
	color: inherit;
	font-size: 1rem;
	line-height: 1.65;
	white-space: pre-line;
}

.spbn-popup__actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 30px;
}

.spbn-popup__cancel,
.spbn-popup__confirm {
	min-height: 46px;
	box-sizing: border-box;
	padding: 11px 20px;
	border-radius: var(--spbn-button-radius, 24px);
	font: inherit;
	font-weight: 700;
	line-height: 1.25;
	cursor: pointer;
}

.spbn-popup__cancel {
	border: 1px solid #c9c5c0;
	background: transparent;
	color: inherit;
}

.spbn-popup__confirm {
	border: 1px solid var(--spbn-button);
	background: var(--spbn-button);
	color: var(--spbn-button-text);
}

.spbn-popup__cancel:hover,
.spbn-popup__confirm:hover {
	filter: brightness(0.94);
}

.spbn-popup button:focus-visible {
	outline: 3px solid var(--spbn-button);
	outline-offset: 3px;
}

@media (max-width: 600px) {
	.spbn-popup {
		align-items: end;
		padding: 14px;
	}

	.spbn-popup__dialog {
		padding: 34px 24px 24px;
		border-radius: 16px;
	}

	.spbn-popup__actions {
		flex-direction: column-reverse;
	}

	.spbn-popup__cancel,
	.spbn-popup__confirm {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.spbn-popup__backdrop,
	.spbn-popup__dialog {
		transition: none;
	}
}
