/*
 * Мобільне меню — шторка знизу. Значення — з лендінгу продукту (packages/shared-ui Sheet, apps/landing MobileMenu):
 * затемнення rgba(0,0,0,.4), поява 240ms ease-out / зникнення 220ms ease-in, верхні кути 20px,
 * висота до 85dvh, «ручка» 36×4, рядки ≥44px (48px на сенсорних), поява рядків 120ms із затримкою order × 12ms.
 */

/* Бокова панель Neve більше не використовується: бургер відкриває шторку (menu-sheet.js). */
.header-menu-sidebar,
.header-menu-sidebar-overlay { display: none !important; }

.pk-sheet[hidden] { display: none; }
.pk-sheet { position: fixed; inset: 0; z-index: 100000; }
.pk-sheet__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
}
.pk-sheet__panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	max-height: min(85dvh, calc(100dvh - env(safe-area-inset-top) - 8px));
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 8px 18px calc(26px + env(safe-area-inset-bottom));
	border-radius: 20px 20px 0 0;
	background: var(--pk-bg-primary);
	color: var(--pk-text-primary);
	box-shadow: var(--pk-shadow-popover);
	outline: none;
	touch-action: pan-y;
}
.pk-sheet__handle {
	width: 36px;
	height: 4px;
	margin: 10px auto;
	border-radius: 999px;
	background: var(--pk-border-default);
}

/* Список пунктів: рамка 14px, рядки з шевроном праворуч */
.pk-sheet__list {
	margin: 8px 0 16px;
	padding: 0;
	list-style: none;
	border: 1px solid var(--pk-border-subtle);
	border-radius: 14px;
	overflow: hidden;
	background: var(--pk-bg-elevated);
}
.pk-sheet__list li + li { border-top: 1px solid var(--pk-border-subtle); }
.pk-sheet__list a {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 44px 0 16px;
	color: var(--pk-text-primary);
	font: 500 16px/1.4 var(--pk-font-text);
	text-decoration: none;
}
.pk-sheet__list a::after {
	content: "";
	position: absolute;
	right: 16px;
	top: 50%;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	background: var(--pk-icon-default);
	-webkit-mask: url("../icons/caret-right.svg") center / contain no-repeat;
	mask: url("../icons/caret-right.svg") center / contain no-repeat;
}
.pk-sheet__list a:hover { background: var(--pk-action-neutral-hover); }
.pk-sheet__list a:focus-visible { outline: 2px solid var(--pk-border-focus); outline-offset: -2px; }

/* Кнопки: «Почати безкоштовно» першою, на всю ширину */
.pk-sheet__actions { display: grid; gap: 8px; margin-bottom: 16px; }
.pk-sheet__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 16px;
	border: 1px solid var(--pk-border-default);
	border-radius: var(--pk-radius-control);
	color: var(--pk-text-primary);
	font: 700 15px/1 var(--pk-font-text);
	text-decoration: none;
}
.pk-sheet__btn:hover { background: var(--pk-action-neutral-hover); }
.pk-sheet__btn--primary {
	border-color: transparent;
	background: var(--pk-action-primary-default);
	color: var(--pk-text-on-action) !important;
}
.pk-sheet__btn--primary:hover { background: var(--pk-action-primary-hover); }

.pk-sheet__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	font-size: 13px;
	line-height: 1.4;
}
.pk-sheet__foot a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--pk-text-secondary);
	text-decoration: none;
}
.pk-sheet__foot a:hover { color: var(--pk-text-primary); }

@media (pointer: coarse) {
	.pk-sheet__list a { min-height: 48px; }
}

/* Рух — лише якщо людина не просила менше анімацій */
@media (prefers-reduced-motion: no-preference) {
	.pk-sheet.is-open .pk-sheet__backdrop { animation: pk-sheet-fade-in 240ms ease-out both; }
	.pk-sheet.is-open .pk-sheet__panel { animation: pk-sheet-up 240ms ease-out both; }
	/* після появи анімацію знімаємо, щоб свайп керував transform напряму */
	.pk-sheet.is-settled .pk-sheet__backdrop,
	.pk-sheet.is-settled .pk-sheet__panel { animation: none; }
	.pk-sheet.is-closing .pk-sheet__backdrop { animation: pk-sheet-fade-out 220ms ease-in both; }
	.pk-sheet.is-closing .pk-sheet__panel { animation: pk-sheet-down 220ms ease-in both; }
	.pk-sheet.is-open .pk-sheet__row {
		animation: pk-sheet-row-in 120ms ease-out both;
		animation-delay: calc(var(--menu-order, 0) * 12ms);
	}
	.pk-sheet.is-dragging .pk-sheet__panel { animation: none; transition: none; }
	.pk-sheet__panel.is-snapping { transition: transform 220ms ease-out; }
	.pk-sheet__panel.is-flinging { transition: transform 180ms ease-in; }
}
@keyframes pk-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pk-sheet-down { from { transform: none; } to { transform: translateY(100%); } }
@keyframes pk-sheet-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pk-sheet-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes pk-sheet-row-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Блокування прокрутки сторінки під шторкою */
html.pk-scroll-locked,
html.pk-scroll-locked body { overflow: hidden; }

/* Шапка на планшеті (768–959): кнопки «Увійти» / «Почати безкоштовно» поруч із бургером, як у продукті */
@media (max-width: 959px) {
	.header--row .builder-item--custom_html { display: none; }
}
@media (min-width: 768px) and (max-width: 959px) {
	.header--row .builder-item--custom_html { display: block; }
}
