/* ===== POPUP WRAPPER ===== */
.modal {
	position: fixed;
	inset: 0;
	display: none;
	z-index: 10000;
}

.modal._open {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding-top: 12vh;
}

/* overlay */
.modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.6);
}

/* ===== WINDOW ===== */
.modal__content {
	position: relative;
	background: #fff;
	border-radius: 12px;
	max-width: 520px;
	width: calc(100% - 40px);
	z-index: 1;
	box-sizing: border-box;
}

/* кнопка закрытия */
.modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	font-size: 24px;
	line-height: 1;
	background: none;
	border: none;
	cursor: pointer;
	color: #043e7c;
	z-index: 2;
}

/* ===== INNER CONTENT ===== */
.modal__inner {
	padding: 56px 24px 30px;   /* ⬅️ ВАЖНО: верхний отступ под крестик */
	text-align: center;
	box-sizing: border-box;
}

/* блокируем скролл страницы */
body._modal-open {
	overflow: hidden;
}

/* ===== MOBILE ===== */
@media (max-width: 767px) {

	.modal._open {
		padding-top: 10vh;
	}

	.modal__content {
		max-width: 420px;
		width: calc(100% - 32px);
		border-radius: 14px;
	}

	.modal__inner {
		padding: 52px 16px 20px;  /* ⬅️ меньше, но всё ещё безопасно */
	}

	.modal__close {
		top: 12px;
		right: 12px;
	}
}
