/**
 * BitkiMO Social Core — anti-fraud интерстишл (MSGW-01).
 *
 * z-index 100000: выше нижней панели (.bmo-bottom-nav z60), листов
 * (z70/71) и модалок HivePress. Нижний отступ оверлея —
 * calc(78px + env(safe-area-inset-bottom)) — то же число, что у кнопки
 * «наверх»: панель не наезжает на диалог, а отступ гарантирует зону
 * тапа по подложке НИЖЕ диалога (тап по подложке = отказ) на любой
 * ширине 320–430.
 */

.bsc-msgwarn-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(20, 28, 23, 0.55);
	padding: 16px 16px calc(78px + env(safe-area-inset-bottom, 0px));
}

.bsc-msgwarn-dialog {
	position: relative; /* якорь для .bsc-msgwarn-close */
	background: #fff;
	border-radius: 12px;
	max-width: 480px;
	width: 100%;
	max-height: min(80vh, 620px);
	overflow: auto;
	padding: 20px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.bsc-msgwarn-title {
	margin: 0 0 12px;
	font-size: 18px;
	line-height: 1.3;
	padding-right: 44px; /* длинный заголовок не заезжает под крестик */
}

.bsc-msgwarn-close {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 44px;  /* тап-таргет */
	height: 44px; /* тап-таргет */
	appearance: none;
	border: 0;
	background: transparent;
	color: #1f2a24;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
}

.bsc-msgwarn-close:focus-visible {
	outline: 2px solid #2e7d4f;
	outline-offset: 2px;
}

.bsc-msgwarn-body p {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 1.5;
}

.bsc-msgwarn-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	margin-top: 16px;
	flex-wrap: wrap;
}

.bsc-msgwarn-btn {
	appearance: none;
	border: 1px solid #cbd5cf;
	background: #fff;
	color: #1f2a24;
	border-radius: 8px;
	padding: 10px 16px;
	font-size: 14px;
	cursor: pointer;
	min-height: 44px; /* тап-таргет */
}

.bsc-msgwarn-btn--primary {
	background: #2e7d4f;
	border-color: #2e7d4f;
	color: #fff;
}

.bsc-msgwarn-btn:focus-visible {
	outline: 2px solid #2e7d4f;
	outline-offset: 2px;
}

body.bsc-msgwarn-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.bsc-msgwarn-dialog {
		padding: 16px;
	}
	.bsc-msgwarn-actions .bsc-msgwarn-btn {
		flex: 1 1 auto;
	}
}
