
/* ===== FLOATING MESSENGER CHAT v1.10.3 ===== */
.contact-chat-widget{
  --chat-brand:#18a558;
  --chat-ink:#142033;
  --chat-muted:#7e8895;
  position:fixed;
  right:18px;
  bottom:92px;
  z-index:9500;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
}

.contact-chat-rail{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

.contact-channel-btn{
  position:relative;
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:16px;
  color:#fff;
  cursor:pointer;
  box-shadow:0 8px 24px rgba(8,24,44,.15);
  transition:transform .2s ease,box-shadow .2s ease;
}
.contact-channel-btn:hover{
  transform:translateX(-3px);
  box-shadow:0 11px 27px rgba(8,24,44,.20);
}
.contact-channel-btn.is-whatsapp{background:#22c55e}
.contact-channel-btn.is-telegram{background:#229ED9}
.contact-channel-btn.is-max{background:linear-gradient(145deg,#5367ff,#7c4dff)}
.contact-channel-icon{
  width:28px;height:28px;display:grid;place-items:center
}
.contact-channel-icon svg{
  width:27px;height:27px;fill:currentColor;stroke:none
}
.contact-channel-icon.max-icon{
  width:30px;height:30px;border-radius:9px;background:#fff;color:#5b55f5;
  font-size:18px;font-weight:900;letter-spacing:-1px
}
.contact-channel-tooltip{
  position:absolute;
  right:62px;
  top:50%;
  transform:translateY(-50%) translateX(5px);
  opacity:0;
  pointer-events:none;
  white-space:nowrap;
  padding:7px 9px;
  border-radius:8px;
  background:#111827;
  color:#fff;
  font-size:11px;
  font-weight:700;
  transition:.18s ease;
}
.contact-channel-tooltip:after{
  content:"";position:absolute;right:-5px;top:50%;transform:translateY(-50%);
  border-width:5px 0 5px 5px;border-style:solid;border-color:transparent transparent transparent #111827
}
.contact-channel-btn:hover .contact-channel-tooltip{
  opacity:1;transform:translateY(-50%) translateX(0)
}

.contact-chat-panel{
  position:absolute;
  right:66px;
  bottom:0;
  width:350px;
  max-width:calc(100vw - 95px);
  overflow:hidden;
  border:1px solid rgba(20,32,51,.10);
  border-radius:18px;
  background:#fff;
  box-shadow:0 24px 70px rgba(7,26,56,.22);
  transform:translateY(12px) scale(.96);
  transform-origin:right bottom;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .22s ease,transform .22s ease,visibility .22s ease;
}
.contact-chat-widget.is-open .contact-chat-panel{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0) scale(1);
}

.contact-chat-head{
  min-height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 14px 12px 16px;
  background:var(--chat-brand);
  color:#fff;
}
.contact-chat-brand{
  display:flex;align-items:center;gap:11px;min-width:0
}
.contact-chat-brand-icon{
  width:40px;height:40px;display:grid;place-items:center;flex:0 0 40px;
  border-radius:12px;background:rgba(255,255,255,.16)
}
.contact-chat-brand-icon svg{
  width:24px;height:24px;fill:#fff
}
.contact-chat-brand-icon .max-mini{
  font-size:18px;font-weight:900;color:#fff
}
.contact-chat-brand>span:last-child{display:flex;flex-direction:column;min-width:0}
.contact-chat-brand strong{
  color:#fff;font-size:14px;line-height:1.15;font-weight:750
}
.contact-chat-brand small{
  display:flex;align-items:center;gap:5px;margin-top:4px;color:rgba(255,255,255,.82);
  font-size:10px;font-weight:500
}
.contact-chat-brand small i{
  width:6px;height:6px;border-radius:50%;background:#86efac;box-shadow:0 0 0 3px rgba(255,255,255,.10)
}
.contact-chat-close{
  width:34px;height:34px;display:grid;place-items:center;border:0;border-radius:9px;
  background:rgba(255,255,255,.11);color:#fff;font-size:25px;line-height:1;cursor:pointer
}

.contact-chat-body{
  height:265px;
  overflow:auto;
  padding:18px 15px 20px;
  background:
    linear-gradient(rgba(247,248,250,.94),rgba(247,248,250,.94)),
    radial-gradient(circle at 20% 20%,#fff 0 1px,transparent 1.5px);
  background-size:auto,16px 16px;
}
.contact-chat-time{
  margin:0 auto 13px;
  width:max-content;
  padding:4px 8px;
  border-radius:999px;
  background:#e9edf2;
  color:#8b949f;
  font-size:9px;
  font-weight:650;
}
.chat-bubble{
  width:max-content;
  max-width:86%;
  margin-bottom:10px;
  padding:10px 12px;
  border-radius:14px;
  font-size:12px;
  line-height:1.5;
  box-shadow:0 2px 7px rgba(20,32,51,.055);
  overflow-wrap:anywhere;
}
.chat-bubble-agent{
  margin-right:auto;
  border-bottom-left-radius:4px;
  background:#fff;
  color:#34404d;
}
.chat-bubble-user{
  margin-left:auto;
  border-bottom-right-radius:4px;
  background:var(--chat-brand);
  color:#fff;
}

.contact-chat-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) 42px;
  gap:9px;
  align-items:end;
  padding:11px;
  border-top:1px solid #edf0f3;
  background:#fff;
}
.contact-chat-form textarea{
  width:100%;
  min-height:42px;
  max-height:104px;
  resize:none;
  overflow:auto;
  padding:11px 12px;
  border:1px solid #dce2e8;
  border-radius:12px;
  outline:0;
  background:#f9fafb;
  color:#2f3945;
  font:12px/1.45 inherit;
}
.contact-chat-form textarea:focus{
  border-color:color-mix(in srgb,var(--chat-brand) 55%,#dce2e8);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--chat-brand) 10%,transparent)
}
.contact-chat-form button{
  width:42px;height:42px;display:grid;place-items:center;border:0;border-radius:12px;
  background:var(--chat-brand);color:#fff;cursor:pointer
}
.contact-chat-form button svg{
  width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round
}
.contact-chat-handoff{
  padding:0 12px 10px;
  background:#fff;
  color:#9aa2aa;
  text-align:center;
  font-size:9px;
  line-height:1.3;
}

.contact-chat-widget.channel-whatsapp{--chat-brand:#19aa59}
.contact-chat-widget.channel-telegram{--chat-brand:#168cc6}
.contact-chat-widget.channel-max{--chat-brand:#6255e8}

@media(max-width:700px){
  .contact-chat-widget{
    right:10px;
    bottom:82px;
  }
  .contact-chat-rail{gap:8px}
  .contact-channel-btn{
    width:48px;height:48px;border-radius:15px
  }
  .contact-chat-panel{
    position:fixed;
    left:10px;
    right:10px;
    bottom:78px;
    width:auto;
    max-width:none;
    border-radius:17px;
    transform-origin:center bottom;
  }
  .contact-chat-body{height:245px}
  .contact-channel-tooltip{display:none}
}

@media(max-height:650px) and (min-width:701px){
  .contact-chat-widget{bottom:18px}
  .contact-chat-body{height:210px}
}

.chat-bubble-agent.is-delivered{border-left:3px solid var(--chat-brand)}
