/* Floatsy v3 — Frontend */
.bychat-w{--bychat-size:60px;--bychat-fan-size:48px;--bychat-color:#25D366;--bychat-radius:50%;position:fixed;bottom:24px;z-index:99999;display:flex;flex-direction:column;align-items:flex-end;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;line-height:1.4;transition:opacity .4s ease,transform .4s ease,visibility .4s}
.bychat-w *,.bychat-w *::before,.bychat-w *::after{box-sizing:border-box}
.bychat-w.bychat-pos-right{right:24px;align-items:flex-end}
.bychat-w.bychat-pos-left{left:24px;align-items:flex-start}
.bychat-w.bychat-hidden{opacity:0;visibility:hidden;pointer-events:none;transform:translateY(16px)}
.bychat-w svg{display:block;flex-shrink:0}

/* ── FAB ── */
.bychat-fab{all:unset;position:relative;box-sizing:border-box;width:var(--bychat-size);height:var(--bychat-size);border-radius:var(--bychat-radius);background:var(--bychat-color);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px;flex-shrink:0;-webkit-tap-highlight-color:transparent;
	--bychat-shadow:0 10px 24px -6px rgba(0,0,0,.28),0 4px 10px -2px rgba(0,0,0,.12);box-shadow:var(--bychat-shadow);
	transition:transform .3s cubic-bezier(.34,1.56,.64,1),box-shadow .25s ease,filter .2s}
@supports (color:color-mix(in srgb,red,blue)){
	.bychat-fab{--bychat-shadow:0 10px 26px -6px color-mix(in srgb,var(--bychat-color) 60%,transparent),0 4px 10px -2px rgba(0,0,0,.14)}
}
.bychat-fab:hover{transform:translateY(-3px) scale(1.04);filter:brightness(1.05)}
.bychat-fab:active{transform:scale(.96)}
.bychat-fab:focus-visible{outline:3px solid var(--bychat-color);outline-offset:4px}
.bychat-fab-icon-default,.bychat-fab-icon-close{display:flex;align-items:center;justify-content:center;transition:transform .35s cubic-bezier(.34,1.56,.64,1),opacity .2s}
.bychat-fab-icon-close{position:absolute;inset:0;opacity:0;transform:rotate(-90deg) scale(.6)}
.bychat-is-open .bychat-fab-icon-default{opacity:0;transform:rotate(90deg) scale(.6)}
.bychat-is-open .bychat-fab-icon-close{opacity:1;transform:rotate(0) scale(1)}

/* ── Shapes ── */
.bychat-shape-circle{--bychat-radius:50%}
.bychat-shape-rounded{--bychat-radius:30%}
.bychat-shape-square{--bychat-radius:8px}
.bychat-shape-leaf{--bychat-radius:50% 8% 50% 8%}
.bychat-shape-drop{--bychat-radius:50% 50% 8% 50%}
.bychat-pos-left.bychat-shape-drop{--bychat-radius:50% 50% 50% 8%}

/* ── Styles ── */
.bychat-style-gradient .bychat-fab,.bychat-style-gradient .bychat-fan-btn{background:var(--bychat-color);background-image:linear-gradient(135deg,rgba(255,255,255,.28) 0%,rgba(255,255,255,0) 50%,rgba(0,0,0,.22) 100%)}

/* ── Animations ── */
.bychat-anim-pulse .bychat-fab{animation:bychat-pulse 2.4s ease-out infinite}
.bychat-is-open.bychat-anim-pulse .bychat-fab{animation:none}
@keyframes bychat-pulse{
	0%{box-shadow:var(--bychat-shadow),0 0 0 0 rgba(0,0,0,.18)}
	70%{box-shadow:var(--bychat-shadow),0 0 0 18px rgba(0,0,0,0)}
	100%{box-shadow:var(--bychat-shadow),0 0 0 0 rgba(0,0,0,0)}
}
@supports (color:color-mix(in srgb,red,blue)){
	@keyframes bychat-pulse{
		0%{box-shadow:var(--bychat-shadow),0 0 0 0 color-mix(in srgb,var(--bychat-color) 55%,transparent)}
		70%{box-shadow:var(--bychat-shadow),0 0 0 18px color-mix(in srgb,var(--bychat-color) 0%,transparent)}
		100%{box-shadow:var(--bychat-shadow),0 0 0 0 color-mix(in srgb,var(--bychat-color) 0%,transparent)}
	}
}

/* ── Badge ── */
.bychat-badge{position:absolute;top:-3px;right:-3px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;line-height:1;min-width:21px;height:21px;border-radius:11px;display:flex;align-items:center;justify-content:center;padding:0 6px;box-shadow:0 2px 6px rgba(239,68,68,.45);border:2px solid #fff;animation:bychat-badge-in .5s cubic-bezier(.34,1.56,.64,1) both .6s}
.bychat-is-open .bychat-badge{display:none}
@keyframes bychat-badge-in{from{transform:scale(0)}to{transform:scale(1)}}

/* ── Tooltip ── */
.bychat-tooltip{position:absolute;bottom:calc(var(--bychat-size) / 2);transform:translateY(50%);background:#0f172a;color:#fff;font-size:13px;font-weight:500;padding:8px 14px;border-radius:10px;white-space:nowrap;box-shadow:0 8px 24px -6px rgba(15,23,42,.4);pointer-events:none;animation:bychat-tip-in .45s cubic-bezier(.34,1.4,.64,1) both;transition:opacity .4s}
.bychat-pos-right .bychat-tooltip{right:calc(var(--bychat-size) + 14px)}
.bychat-pos-left .bychat-tooltip{left:calc(var(--bychat-size) + 14px)}
.bychat-tooltip::after{content:'';position:absolute;top:50%;width:10px;height:10px;background:inherit;transform:translateY(-50%) rotate(45deg);border-radius:2px}
.bychat-pos-right .bychat-tooltip::after{right:-4px}
.bychat-pos-left .bychat-tooltip::after{left:-4px}
.bychat-is-open .bychat-tooltip,.bychat-tooltip.bychat-gone{opacity:0;visibility:hidden;animation:none;transition:opacity .4s,visibility 0s .4s}
@keyframes bychat-tip-in{from{opacity:0;transform:translateY(50%) translateX(8px)}to{opacity:1;transform:translateY(50%)}}

/* ── FAN buttons ── */
.bychat-fan{display:flex;flex-direction:column;align-items:flex-end;gap:12px;margin-bottom:14px;pointer-events:none}
.bychat-pos-left .bychat-fan{align-items:flex-start}
.bychat-fan-item{display:flex;align-items:center;gap:10px;opacity:0;transform:translateY(16px) scale(.8);transition:opacity .22s ease,transform .3s cubic-bezier(.34,1.56,.64,1);pointer-events:none}
.bychat-pos-right .bychat-fan-item{padding-right:calc((var(--bychat-size) - var(--bychat-fan-size)) / 2)}
.bychat-pos-left .bychat-fan-item{flex-direction:row-reverse;padding-left:calc((var(--bychat-size) - var(--bychat-fan-size)) / 2)}
.bychat-fan.bychat-fan-open{pointer-events:auto}
.bychat-fan.bychat-fan-open .bychat-fan-item{opacity:1;transform:none;pointer-events:auto}
.bychat-fan.bychat-fan-open .bychat-fan-item:nth-last-child(1){transition-delay:.02s}
.bychat-fan.bychat-fan-open .bychat-fan-item:nth-last-child(2){transition-delay:.06s}
.bychat-fan.bychat-fan-open .bychat-fan-item:nth-last-child(3){transition-delay:.10s}
.bychat-fan.bychat-fan-open .bychat-fan-item:nth-last-child(4){transition-delay:.14s}
.bychat-fan.bychat-fan-open .bychat-fan-item:nth-last-child(5){transition-delay:.18s}
.bychat-fan.bychat-fan-open .bychat-fan-item:nth-last-child(6){transition-delay:.22s}
.bychat-fan.bychat-fan-open .bychat-fan-item:nth-last-child(n+7){transition-delay:.26s}

.bychat-fan-btn{all:unset;box-sizing:border-box;width:var(--bychat-fan-size);height:var(--bychat-fan-size);border-radius:var(--bychat-radius);background:var(--bychat-color);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 6px 16px -4px rgba(0,0,0,.3);transition:transform .25s cubic-bezier(.34,1.56,.64,1),box-shadow .2s}
.bychat-fan-btn:hover{transform:scale(1.1);box-shadow:0 10px 22px -6px rgba(0,0,0,.35)}
.bychat-fan-btn:focus-visible{outline:3px solid var(--bychat-color);outline-offset:3px}
.bychat-fan-label{background:#fff;color:#0f172a;font-size:13px;font-weight:600;padding:7px 13px;border-radius:999px;white-space:nowrap;box-shadow:0 4px 14px -2px rgba(15,23,42,.18),0 0 0 1px rgba(15,23,42,.05);cursor:pointer}

/* ── WhatsApp Popup ── */
.bychat-popup{width:350px;max-width:calc(100vw - 32px);background:#fff;border-radius:20px;overflow:hidden;box-shadow:0 24px 60px -12px rgba(15,23,42,.35),0 0 0 1px rgba(15,23,42,.05);display:none;flex-direction:column;margin-bottom:16px;transform-origin:bottom right;color:#0f172a}
.bychat-pos-left .bychat-popup{transform-origin:bottom left}
.bychat-popup.bychat-popup-open{display:flex;animation:bychat-popup-in .4s cubic-bezier(.34,1.4,.64,1)}
@keyframes bychat-popup-in{from{opacity:0;transform:translateY(16px) scale(.92)}to{opacity:1;transform:none}}

.bychat-popup-header{padding:18px 16px;display:flex;align-items:center;gap:12px;color:#fff;background-image:linear-gradient(135deg,rgba(255,255,255,.12),rgba(0,0,0,.18))!important}
.bychat-popup-av{position:relative;flex-shrink:0;width:46px;height:46px}
.bychat-av-circle{width:46px;height:46px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.18);color:#fff}
.bychat-av-img{width:46px;height:46px;border-radius:50%;object-fit:cover;display:block;border:2px solid rgba(255,255,255,.6)}
.bychat-status-dot{position:absolute;bottom:1px;right:1px;width:12px;height:12px;border-radius:50%;border:2px solid #fff}
.bychat-online{background:#22c55e}.bychat-offline{background:#94a3b8}
.bychat-popup-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.bychat-popup-name{font-weight:700;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bychat-popup-status{color:rgba(255,255,255,.85);font-size:12px}
.bychat-popup-close{all:unset;cursor:pointer;padding:6px;border-radius:50%;display:flex;color:#fff;opacity:.85;transition:background .15s,opacity .15s;flex-shrink:0}
.bychat-popup-close:hover{background:rgba(255,255,255,.2);opacity:1}

.bychat-popup-body{background:#efeae2;background-image:radial-gradient(rgba(0,0,0,.045) 1px,transparent 1px);background-size:14px 14px;padding:18px 16px;min-height:120px;max-height:320px;overflow-y:auto}
.bychat-popup-bubble{position:relative;background:#fff;border-radius:0 14px 14px 14px;padding:10px 14px 8px;display:inline-flex;flex-direction:column;gap:4px;max-width:88%;box-shadow:0 1px 2px rgba(0,0,0,.12);font-size:14px;line-height:1.5;color:#0f172a;animation:bychat-bubble-in .4s ease both .15s;white-space:pre-line}
.bychat-popup-bubble::before{content:'';position:absolute;top:0;left:-7px;border-width:0 8px 8px 0;border-style:solid;border-color:transparent #fff transparent transparent}
@keyframes bychat-bubble-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.bychat-bubble-time{font-size:11px;color:#94a3b8;align-self:flex-end}

.bychat-popup-footer{padding:10px 12px;background:#f8fafc;display:flex;align-items:center;gap:8px;border-top:1px solid #f1f5f9}
.bychat-popup-input{flex:1;min-width:0;border:1.5px solid #e2e8f0!important;border-radius:24px!important;padding:10px 16px!important;font-size:14px!important;font-family:inherit;outline:none;background:#fff!important;color:#0f172a!important;margin:0!important;height:auto!important;box-shadow:none!important;transition:border-color .2s}
.bychat-popup-input:focus{border-color:#25D366!important}
.bychat-popup-send{all:unset;width:44px;height:44px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:#fff;transition:transform .2s;box-shadow:0 4px 12px -2px rgba(0,0,0,.25)}
.bychat-popup-send:hover{transform:scale(1.08)}
.bychat-popup-cta{all:unset;box-sizing:border-box;width:100%;padding:10px 16px;background:#fff;border-top:1px solid #f1f5f9;display:flex;align-items:center;justify-content:center;gap:7px;font-size:12px;color:#64748b;cursor:pointer;transition:background .15s}
.bychat-popup-cta svg{color:var(--bychat-color)}
.bychat-popup-cta:hover{background:#f8fafc;color:#0f172a}

/* ── Responsive ── */
@media(max-width:480px){
	.bychat-w.bychat-pos-right{right:16px;bottom:16px}
	.bychat-w.bychat-pos-left{left:16px;bottom:16px}
}
@media(prefers-reduced-motion:reduce){
	.bychat-w,.bychat-w *{animation:none!important;transition:none!important}
}
