body.language-picker-open {
	overflow: hidden;
}

.lp-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.28s ease;
}

.lp-modal:not([hidden]) {
	opacity: 1;
	pointer-events: auto;
}

.lp-modal.is-closing {
	opacity: 0;
	pointer-events: none;
}

.lp-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(6px);
}

.lp-modal__panel {
	position: relative;
	width: min(100%, 34rem);
	padding: 2rem 2rem 1.75rem;
	border-radius: 1.25rem;
	background: #fff;
	box-shadow:
		0 25px 50px -12px rgba(15, 23, 42, 0.35),
		0 0 0 1px rgba(15, 23, 42, 0.05);
	transform: translateY(12px) scale(0.98);
	animation: lp-modal-enter 0.34s ease forwards;
}

.lp-modal.is-closing .lp-modal__panel {
	animation: lp-modal-leave 0.22s ease forwards;
}

.lp-modal__accent {
	position: absolute;
	top: 0;
	left: 1.5rem;
	right: 1.5rem;
	height: 4px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--lp-primary), var(--lp-primary-light));
}

.lp-modal__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	margin: 0 auto 1rem;
	border-radius: 999px;
	color: var(--lp-primary-dark);
	background: var(--lp-primary-soft);
}

.lp-modal__icon svg {
	width: 1.75rem;
	height: 1.75rem;
}

.lp-modal__title {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	margin: 0 0 0.85rem;
	text-align: center;
	font-size: 1.125rem;
	line-height: 1.45;
	font-weight: 600;
	color: #0f172a;
}

.lp-modal__title-en,
.lp-modal__title-ru {
	display: block;
}

.lp-modal__title-divider {
	display: block;
	width: 3rem;
	height: 2px;
	margin: 0 auto;
	border-radius: 999px;
	background: linear-gradient(90deg, transparent, var(--lp-primary-light), transparent);
}

.lp-modal__subtitle {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0 0 1.5rem;
	text-align: center;
	font-size: 0.925rem;
	line-height: 1.5;
	color: #64748b;
}

.lp-modal__actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.85rem;
}

.lp-modal__button {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-height: 5.5rem;
	padding: 1rem;
	border: 2px solid #e2e8f0;
	border-radius: 1rem;
	background: #fff;
	color: #0f172a;
	cursor: pointer;
	transition:
		transform 0.18s ease,
		border-color 0.18s ease,
		background-color 0.18s ease,
		box-shadow 0.18s ease;
}

.lp-modal__button:hover,
.lp-modal__button:focus-visible {
	outline: none;
	transform: translateY(-2px);
	border-color: var(--lp-primary-light);
	background: var(--lp-primary-soft);
	box-shadow: 0 10px 24px -16px var(--lp-primary);
}

.lp-modal__button:active {
	transform: translateY(0);
	background: var(--lp-primary);
	border-color: var(--lp-primary);
	color: #fff;
}

.lp-modal__button:active .lp-modal__button-flag {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
}

.lp-modal__button-flag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2rem;
	padding: 0 0.65rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--lp-primary-dark);
	background: var(--lp-primary-soft);
}

.lp-modal__button-label {
	font-size: 1.05rem;
	font-weight: 600;
}

@media (max-width: 520px) {
	.lp-modal__panel {
		padding: 1.5rem 1.25rem 1.25rem;
	}

	.lp-modal__actions {
		grid-template-columns: 1fr;
	}

	.lp-modal__title {
		font-size: 1rem;
	}
}

@keyframes lp-modal-enter {
	from {
		opacity: 0;
		transform: translateY(18px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes lp-modal-leave {
	from {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
	to {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
}

@media (prefers-color-scheme: dark) {
	.lp-modal__panel {
		background: #0f172a;
		box-shadow:
			0 25px 50px -12px rgba(0, 0, 0, 0.65),
			0 0 0 1px rgba(148, 163, 184, 0.12);
	}

	.lp-modal__title {
		color: #f8fafc;
	}

	.lp-modal__subtitle {
		color: #94a3b8;
	}

	.lp-modal__button {
		background: #111827;
		border-color: #334155;
		color: #f8fafc;
	}

	.lp-modal__button:hover,
	.lp-modal__button:focus-visible {
		background: rgba(255, 255, 255, 0.04);
	}
}

.dark .lp-modal__panel {
	background: #0f172a;
	box-shadow:
		0 25px 50px -12px rgba(0, 0, 0, 0.65),
		0 0 0 1px rgba(148, 163, 184, 0.12);
}

.dark .lp-modal__title {
	color: #f8fafc;
}

.dark .lp-modal__subtitle {
	color: #94a3b8;
}

.dark .lp-modal__button {
	background: #111827;
	border-color: #334155;
	color: #f8fafc;
}

.dark .lp-modal__button:hover,
.dark .lp-modal__button:focus-visible {
	background: rgba(255, 255, 255, 0.04);
}
