/* CHAT */
.chat-widget{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:3000;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:12px;
}

.chat-menu{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
  opacity:0;
  pointer-events:none;
  transform:translateY(12px) scale(.96);
  transition:.20s ease;
}

.chat-widget.open .chat-menu{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0) scale(1);
}

.chat-item{
  min-width:224px;
  height:54px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 16px;
  border-radius:999px;
  color:#fff;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 14px 28px rgba(0,0,0,.16);
  transition:.18s ease;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

.chat-item:hover{ transform:translateY(-2px) scale(1.02); }
.chat-item.line{ background:linear-gradient(135deg, #10d95a 0%, #06c755 55%, #02a94b 100%); }
.chat-item.facebook{ background:linear-gradient(135deg, #2a86ff 0%, #1877f2 55%, #0f5fd3 100%); }
.chat-item.youtube{ background:linear-gradient(135deg, #ff2f2f 0%, #ff0000 55%, #c90000 100%); }
.chat-item.tiktok{ background:linear-gradient(135deg, #232323 0%, #111111 55%, #000000 100%); }

.chat-icon{
  width:34px;
  height:34px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 34px;
  font-size:12px;
  font-weight:800;
}

.chat-fab{
  width:66px;
  height:66px;
  border:none;
  border-radius:999px;
  background:linear-gradient(135deg, #0b4ea2, #1f69cd);
  color:#fff;
  cursor:pointer;
  box-shadow:0 18px 36px rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.18);
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  transition:.18s ease;
}

.chat-fab:hover{ transform:translateY(-2px); }

.chat-fab-text{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:800;
  line-height:1.04;
}

.chat-caret{
  position:absolute;
  right:-2px;
  top:-2px;
  width:22px;
  height:22px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  color:#0b4ea2;
  font-size:10px;
  box-shadow:0 6px 16px rgba(11,78,162,.16);
  transition:.20s ease;
}

.chat-widget.open .chat-caret{ transform:rotate(180deg); }

/* ANIMATION */
@keyframes popupIn{
  from{ opacity:0; transform:translateY(18px) scale(.96); }
  to{ opacity:1; transform:translateY(0) scale(1); }
}

@keyframes slowFloat{
  0%,100%{ transform:translateY(0); }
  50%{ transform:translateY(-8px); }
}

@keyframes corePulse{
  0%,100%{ transform:translate(-50%,-50%) scale(1); opacity:1; }
  50%{ transform:translate(-50%,-50%) scale(1.04); opacity:.86; }
}

@keyframes centerGlow{
  0%,100%{ transform:translate(-50%, -50%) scale(1); opacity:1; }
  50%{ transform:translate(-50%, -50%) scale(1.04); opacity:.88; }
}

@keyframes spinSlow{
  from{ transform:translate(-50%,-50%) rotate(0deg); }
  to{ transform:translate(-50%,-50%) rotate(360deg); }
}

@keyframes spinSlowReverse{
  from{ transform:translate(-50%,-50%) rotate(360deg); }
  to{ transform:translate(-50%,-50%) rotate(0deg); }
}

@keyframes runEnergy{
  from{ stroke-dashoffset:0; }
  to{ stroke-dashoffset:-358; }
}

@keyframes pulseOut{
  0%{ opacity:.8; transform:translate(-50%,-50%) scale(.35); }
  100%{ opacity:0; transform:translate(-50%,-50%) scale(1.15); }
}

/* FIX LOGO HEADER */
.brand-logo{
  display:flex;
  align-items:center;
  justify-content:center;
}

.brand-logo img{
  width:42px;
  height:auto;
  object-fit:contain;
  display:block;
}

.chat-widget.compact{
  position:fixed;
  right:16px;
  bottom:18px;
  z-index:60;
  display:flex;
  flex-direction:column-reverse;
  align-items:center;
  gap:10px;
}

.chat-widget.compact .chat-menu{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  opacity:0;
  transform:translateY(8px) scale(.96);
  pointer-events:none;
  transition:
    opacity .22s ease,
    transform .22s ease;
}

.chat-widget.compact.open .chat-menu{
  opacity:1;
  transform:translateY(0) scale(1);
  pointer-events:auto;
}

.chat-widget.compact .chat-item{
  width:48px;
  height:48px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(255,255,255,.85);
  box-shadow:
    0 10px 24px rgba(25,55,105,.12),
    0 4px 12px rgba(25,55,105,.08),
    inset 0 1px 0 rgba(255,255,255,.95);
  text-decoration:none;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.chat-widget.compact .chat-item:hover{
  transform:translateY(-2px);
  box-shadow:
    0 14px 28px rgba(25,55,105,.16),
    0 6px 16px rgba(25,55,105,.10),
    inset 0 1px 0 rgba(255,255,255,.98);
  border-color:rgba(120,170,255,.45);
}

.chat-widget.compact .chat-item:active{
  transform:scale(.96);
}

.chat-widget.compact .chat-item img{
  width:22px;
  height:22px;
  display:block;
  object-fit:contain;
}

.chat-widget.compact .chat-fab{
  width:56px;
  height:56px;
  border:none;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(240,247,255,.94) 100%);
  border:1px solid rgba(255,255,255,.88);
  box-shadow:
    0 16px 34px rgba(25,55,105,.16),
    0 6px 18px rgba(25,55,105,.10),
    inset 0 1px 0 rgba(255,255,255,.98);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  transition:
    transform .18s ease,
    box-shadow .18s ease;
}

.chat-widget.compact .chat-fab:hover{
  transform:translateY(-2px);
}

.chat-widget.compact .chat-fab:active{
  transform:scale(.96);
}

.chat-widget.compact .chat-fab img{
  width:26px;
  height:26px;
  display:block;
  object-fit:contain;
}

@media (max-width: 1023px){
  .chat-widget.compact{
    right:12px;
    bottom:12px;
  }

  .chat-widget.compact .chat-fab{
    width:52px;
    height:52px;
  }

  .chat-widget.compact .chat-item{
    width:44px;
    height:44px;
  }

  .chat-widget.compact .chat-fab img{
    width:24px;
    height:24px;
  }

  .chat-widget.compact .chat-item img{
    width:20px;
    height:20px;
  }
}
