/* XCTIC front end: mobile CTA bar, floating WhatsApp, popups. Mobile first. */
:root { --xctic-bar-h: 0px; --xctic-primary: #2563EB; --xctic-wa: #25D366; --xctic-call: #0F172A; --xctic-radius: 14px; }

/* ---------- Sticky mobile conversion bar ---------- */
.xctic-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 99990;
	display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px;
	padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
	background: rgba(255, 255, 255, .97); box-shadow: 0 -6px 24px rgba(15, 23, 42, .12);
	transition: transform .2s ease;
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.xctic-bar a {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 10px; border-radius: 12px;
	font: 600 15px/1.1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-decoration: none; color: #fff;
	-webkit-tap-highlight-color: transparent;
}
.xctic-bar a:focus-visible, .xctic-wa:focus-visible { outline: 3px solid #FACC15; outline-offset: 2px; }
.xctic-bar svg { width: 20px; height: 20px; flex: none; }
.xctic-bar .is-call { background: var(--xctic-call); }
.xctic-bar .is-wa { background: var(--xctic-wa); color: #053B1C; }
.xctic-bar .is-form { background: var(--xctic-primary); }
html.xctic-has-bar body { padding-bottom: calc(var(--xctic-bar-h) + env(safe-area-inset-bottom, 0px)) !important; }
html.xctic-typing .xctic-bar, html.xctic-pop-open .xctic-bar { transform: translateY(115%); }
@media (min-width: 768px) {
	.xctic-bar.is-mobile-only { display: none; }
	html.xctic-has-bar.xctic-bar-mobile body { padding-bottom: 0 !important; }
	.xctic-bar:not(.is-mobile-only) { left: 50%; right: auto; transform: translateX(-50%); bottom: 16px; border-radius: 18px; padding: 8px; min-width: 420px; }
	html.xctic-typing .xctic-bar:not(.is-mobile-only) { transform: translate(-50%, 140%); }
}
@media (max-width: 340px) { .xctic-bar a span { display: none; } }

/* ---------- Floating WhatsApp ---------- */
.xctic-wa {
	position: fixed; z-index: 99989; bottom: calc(var(--xctic-bar-h) + 16px + env(safe-area-inset-bottom, 0px));
	width: 56px; height: 56px; border-radius: 50%; background: var(--xctic-wa);
	display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
	transition: transform .2s ease;
}
.xctic-wa.is-right { right: 16px; } .xctic-wa.is-left { left: 16px; }
.xctic-wa svg { width: 30px; height: 30px; }
.xctic-wa:hover { transform: scale(1.06); }
.xctic-wa .xctic-wa-tip { position: absolute; right: 64px; white-space: nowrap; background: #fff; color: #111; font: 600 13px/1 system-ui, sans-serif; padding: 9px 12px; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.xctic-wa.is-left .xctic-wa-tip { right: auto; left: 64px; }
@media (max-width: 767px) {
	html.xctic-has-bar .xctic-wa.hide-with-bar { display: none; }
	/* Any bottom bar (settings bar or a landing page's Sticky CTA) that already offers WhatsApp → no duplicate bubble covering content. */
	html.xctic-has-bar:has(.xctic-bar a[href*="wa.me"]) .xctic-wa { display: none; }
	.xctic-wa .xctic-wa-tip { display: none; }
}
html.xctic-typing .xctic-wa, html.xctic-pop-open .xctic-wa { opacity: 0; pointer-events: none; }

/* ---------- Popups ---------- */
.xctic-pop { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .55); opacity: 0; transition: opacity .2s ease; }
.xctic-pop[hidden] { display: none; }
.xctic-pop.is-open { opacity: 1; }
.xctic-pop-box { position: relative; width: 100%; max-width: var(--xctic-pop-w, 560px); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: var(--xctic-radius); box-shadow: 0 24px 64px rgba(0,0,0,.3); transform: translateY(12px); transition: transform .2s ease; -webkit-overflow-scrolling: touch; }
.xctic-pop.is-open .xctic-pop-box { transform: none; }
.xctic-pop-close { position: absolute; top: 8px; right: 8px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); font: 400 28px/1 system-ui, sans-serif; color: #111; cursor: pointer; }
.xctic-pop-close:focus-visible { outline: 3px solid var(--xctic-primary); }
.xctic-pop-inner { padding: 28px 22px 22px; }
@media (max-width: 767px) {
	.xctic-pop.is-sheet { align-items: flex-end; padding: 0; }
	.xctic-pop.is-sheet .xctic-pop-box { max-width: none; border-radius: 20px 20px 0 0; max-height: 88vh; padding-bottom: env(safe-area-inset-bottom, 0px); transform: translateY(100%); }
	.xctic-pop.is-sheet.is-open .xctic-pop-box { transform: none; }
}
html.xctic-pop-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .xctic-bar, .xctic-wa, .xctic-pop, .xctic-pop-box { transition: none; } }
