/**
 * Install UI for both apps — flat, no hover shadows, RTL-safe.
 * Loaded on the site and inside the management panel.
 */

.mz-install {
	position: fixed;
	z-index: 96;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid #e3dccd;
	border-radius: 16px;
	background: #fff;
	color: #23261c;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.6;
	direction: rtl;
	box-shadow: none;
}
.mz-install[hidden] { display: none !important; }

/* bottom bar (default): above the mobile tab bar */
.mz-install--bar {
	inset-inline: 12px;
	bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	max-width: 560px;
	margin-inline: auto;
}
/* the site mobile bar (.mz-mbar) is fixed at the bottom below 1025px */
@media (max-width: 1024px) {
	.mz-install--bar { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

	/* the floating contact/support stack moves up while the bar is on screen */
	body:has(.mz-install--bar:not([hidden])) .mz-floats { bottom: calc(184px + env(safe-area-inset-bottom, 0px)); }

	/* never compete with the product page's buy bar */
	body:has(.mz-sticky-atc.is-visible) .mz-install--bar { display: none; }

	.mz-install--float { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* small pill */
.mz-install--float {
	inset-inline-start: 16px;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	max-width: 320px;
	padding: 10px 12px;
	border-radius: 999px;
}

.mz-install__icon { flex: 0 0 auto; display: grid; place-items: center; }
.mz-install__icon img { width: 40px; height: 40px; border-radius: 11px; display: block; object-fit: cover; }
.mz-install--float .mz-install__icon img { width: 30px; height: 30px; border-radius: 8px; }

.mz-install__text { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.mz-install__text b { font-size: 13px; font-weight: 800; }
.mz-install__text i {
	font-style: normal;
	font-size: 11.5px;
	color: #7c746a;
	line-height: 1.7;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}
.mz-install--float .mz-install__text i { display: none; }

.mz-install__go {
	flex: 0 0 auto;
	border: 0;
	border-radius: 999px;
	padding: 9px 16px;
	background: #23261c;
	color: #fff;
	font: inherit;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	transition: transform .14s ease, opacity .14s ease;
}
.mz-install__go:active { transform: scale(.97); }
.mz-install__go[data-mz-install-busy] { opacity: .6; pointer-events: none; }

.mz-install__close {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid #e3dccd;
	background: transparent;
	color: #7c746a;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
}

/* inline button style (shortcode / header builder) */
.mz-install--button {
	position: static;
	display: inline-flex;
	max-width: none;
	margin: 0;
	padding: 8px 10px;
	border-radius: 12px;
}
.mz-install--button .mz-install__icon img { width: 26px; height: 26px; border-radius: 7px; }
.mz-install--button .mz-install__text i { display: none; }
.mz-install--button .mz-install__close { display: none; }
.mz-install--button .mz-install__go { padding: 7px 12px; font-size: 12px; }

/* toast */
.mz-pwa-toast {
	position: fixed;
	inset-inline: 16px;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	z-index: 200;
	max-width: 420px;
	margin-inline: auto;
	padding: 12px 16px;
	border-radius: 12px;
	background: #23261c;
	color: #fff;
	font-family: inherit;
	font-size: 12.5px;
	line-height: 1.8;
	text-align: center;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .22s ease, transform .22s ease;
}
.mz-pwa-toast.is-on { opacity: 1; transform: none; }

@media (max-width: 460px) {
	.mz-install { font-size: 12.5px; padding: 10px 12px; gap: 10px; }
	.mz-install__go { padding: 8px 13px; }
	.mz-install__text i { display: none; }
	.mz-install__icon img { width: 34px; height: 34px; border-radius: 9px; }
}

@media (max-width: 360px) {
	.mz-install__text i { display: none; }
}

@media (prefers-color-scheme: dark) {
	.mz-install { background: #1c1916; border-color: #2c2823; color: #f4f0ea; }
	.mz-install__text i { color: #9a9288; }
	.mz-install__go { background: #f4f0ea; color: #14120f; }
	.mz-install__close { border-color: #2c2823; color: #9a9288; }
	.mz-pwa-toast { background: #f4f0ea; color: #14120f; }
}

/* inside the management panel the bar sits above the tab bar */
.mz-app-body .mz-install { font-family: inherit; }
