/* Escorts PWA — воронка установки. Классы с префиксом epwa-, чтобы ничего не задеть в теме. */

/* Внутри установленного приложения все призывы установить приложение — мусор. */
.escorts-standalone .epwa-bar,
.escorts-standalone .epwa-cta,
.escorts-standalone .epwa-sheet { display: none !important; }

/* ---------- плавающая полоса ---------- */

.epwa-bar {
	position: fixed;
	left: 12px;
	right: 12px;
	/* Отступ снизу подставляется скриптом: в теме есть своя фиксированная
	   панель .mobile-action-buttons, и вставать поверх неё нельзя. */
	bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	/* Ниже мобильного меню темы (оверлей 9999, drawer 10000): открытое меню
	   должно перекрывать полосу, а не наоборот. */
	z-index: 9000;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 40px 10px 12px;
	border-radius: 14px;
	background: #1a1a1a;
	color: #fff;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .28);
	font-size: 13.5px;
	line-height: 1.35;
	animation: epwa-rise .28s ease-out;
}

@keyframes epwa-rise {
	from { transform: translateY(16px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.epwa-bar { animation: none; }
}

.epwa-bar__icon { border-radius: 9px; flex: none; }

.epwa-bar__text {
	flex: 1 1 auto;
	min-width: 0;
	/* Максимум две строки: полоса не должна разрастаться на пол-экрана. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.epwa-bar__get {
	flex: none;
	font: inherit;
	font-weight: 600;
	border: 0;
	border-radius: 9px;
	padding: 9px 14px;
	background: #e53e3e;
	color: #fff;
	cursor: pointer;
	white-space: nowrap;
}

/* Отказ — компактный крестик: на 375px текстовая кнопка «Ahora no» съедала
   ширину и ломала полосу в три строки. */
.epwa-bar__later {
	position: absolute;
	top: 6px;
	inset-inline-end: 6px;
	width: 26px;
	height: 26px;
	font: inherit;
	font-size: 17px;
	line-height: 1;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: rgba(255, 255, 255, .8);
	cursor: pointer;
	padding: 0;
}

.epwa-bar__later:hover { background: rgba(255, 255, 255, .2); }

@media (min-width: 720px) {
	.epwa-bar { left: auto; right: 20px; max-width: 420px; }
}

/* ---------- шторка с инструкцией ---------- */

.epwa-sheet {
	position: fixed;
	inset: 0;
	z-index: 99995;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.epwa-sheet__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
}

.epwa-sheet__card {
	position: relative;
	width: 100%;
	max-width: 460px;
	background: #fff;
	color: #1a1a1a;
	border-radius: 18px 18px 0 0;
	padding: 10px 22px calc(26px + env(safe-area-inset-bottom, 0px));
	box-shadow: 0 -10px 40px rgba(0, 0, 0, .3);
	animation: epwa-slide .26s ease-out;
}

@keyframes epwa-slide {
	from { transform: translateY(100%); }
	to   { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.epwa-sheet__card { animation: none; }
}

.epwa-sheet__handle {
	width: 40px;
	height: 4px;
	border-radius: 2px;
	background: #d8dee6;
	margin: 0 auto 16px;
}

.epwa-sheet__title { font-size: 19px; margin: 0 0 6px; }

.epwa-sheet__lede {
	margin: 0 0 16px;
	color: #5b6570;
	font-size: 14.5px;
	line-height: 1.5;
}

.epwa-sheet__warn {
	margin: 0 0 16px;
	padding: 11px 13px;
	border-radius: 9px;
	background: #fdf3e0;
	color: #6b4c11;
	font-size: 13.5px;
	line-height: 1.5;
}

.epwa-sheet__steps {
	margin: 0 0 20px;
	padding-inline-start: 22px;
	font-size: 15px;
	line-height: 1.55;
}

.epwa-sheet__steps li { margin-bottom: 9px; }

.epwa-sheet__close {
	width: 100%;
	font: inherit;
	font-weight: 600;
	border: 0;
	border-radius: 11px;
	padding: 13px;
	background: #f0f2f5;
	color: #1a1a1a;
	cursor: pointer;
}

@media (min-width: 720px) {
	.epwa-sheet { align-items: center; }
	.epwa-sheet__card { border-radius: 18px; padding-bottom: 26px; }
	.epwa-sheet__handle { display: none; }
}

/* ---------- инлайновая кнопка (шорткод) ---------- */

.epwa-cta {
	display: inline-block;
	font: inherit;
	font-weight: 600;
	border: 0;
	border-radius: 10px;
	padding: 12px 20px;
	background: #1a1a1a;
	color: #fff;
	cursor: pointer;
}

.epwa-cta:hover { background: #333; }

/* ---------- страница /app/ ---------- */

.epwa-app { max-width: 40rem; }

.epwa-app__lede {
	font-size: 16.5px;
	line-height: 1.6;
	margin: 0 0 20px;
}

.epwa-app__done {
	display: block;
	padding: 14px 16px;
	border-radius: 10px;
	background: #e6f4ec;
	border: 1px solid #9ed0b4;
	margin: 0 0 20px;
}

.epwa-app__done strong { display: block; margin-bottom: 3px; }
.epwa-app__done span { color: #2c5f47; font-size: 14.5px; }

.epwa-app__block {
	border: 1px solid #e8e5df;
	border-radius: 10px;
	margin: 0 0 10px;
	background: #fff;
}

.epwa-app__block > summary {
	cursor: pointer;
	padding: 14px 16px;
	font-weight: 600;
	list-style: none;
}

.epwa-app__block > summary::-webkit-details-marker { display: none; }

.epwa-app__block > summary::after {
	content: '+';
	float: right;
	color: #aaa;
	font-weight: 400;
}

.epwa-app__block[open] > summary::after { content: '–'; }

.epwa-app__body { padding: 0 16px 16px; }
.epwa-app__body ol { margin: 0 0 14px; padding-inline-start: 20px; line-height: 1.6; }
.epwa-app__body li { margin-bottom: 7px; }

.epwa-app__note {
	padding: 11px 13px;
	border-radius: 9px;
	background: #fdf3e0;
	color: #6b4c11;
	font-size: 13.5px;
	line-height: 1.5;
	margin: 0 0 12px;
}

.epwa-app__qr {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 8px;
}

.epwa-app__qr img {
	border: 1px solid #e8e5df;
	border-radius: 8px;
	flex: none;
}

.epwa-app__qr span { font-size: 13.5px; color: #666; }

.epwa-app__push {
	margin-top: 28px;
	padding-top: 22px;
	border-top: 1px solid #e8e5df;
}

.epwa-app__push h2 { font-size: 18px; margin: 0 0 6px; }
.epwa-app__push p { margin: 0 0 14px; }

.epwa-app__push-btn {
	font: inherit;
	font-weight: 600;
	border: 0;
	border-radius: 10px;
	padding: 12px 20px;
	background: #1a1a1a;
	color: #fff;
	cursor: pointer;
}

.epwa-app__push-btn[data-on] { background: #f0f2f5; color: #1a1a1a; }
.epwa-app__push-btn:disabled { opacity: .55; cursor: default; }

.epwa-app__push-state {
	margin: 10px 0 0 !important;
	font-size: 14px;
	color: #666;
}
