.d2d-ww-btn {
    border: none;
    padding: 10px 15px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all .2s ease;
}
.d2d-ww-btn.round { border-radius: 25px; }
.d2d-ww-btn.square { border-radius: 4px; }
.d2d-ww-btn:hover { opacity: 0.9; }

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}
.switch input { display: none; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider { background-color: #25D366; }
input:checked + .slider:before { transform: translateX(26px); }
/* === ADVANCED CUSTOMIZATION STYLES === */
#d2d-ww-floating {
  position:fixed;
  z-index:9999;
  display:flex;
  align-items:center;
  gap:8px;
}
.d2d-ww-left { left:20px; }
.d2d-ww-right { right:20px; }

.d2d-ww-svg { width:28px; height:28px; vertical-align:middle; }

#d2d-ww-popup {
  position:fixed;
  bottom:80px;
  right:25px;
  background:#fff;
  color:#333;
  border-radius:18px;
  padding:10px 14px;
  font-size:14px;
  box-shadow:0 2px 6px rgba(0,0,0,0.15);
  opacity:0;
  transition:opacity .3s ease;
}
#d2d-ww-popup.visible { opacity:1; }
#d2d-ww-popup.hidden { display:none; }

/* Animations */
.anim-bounce .d2d-ww-btn { animation:bounce 2s infinite; }
.anim-pulse  .d2d-ww-btn { animation:pulse 2s infinite; }
.anim-fade   .d2d-ww-btn { animation:fadein 1s ease-in; }

@keyframes bounce {
  0%,20%,50%,80%,100%{transform:translateY(0);}
  40%{transform:translateY(-8px);}
  60%{transform:translateY(-4px);}
}
@keyframes pulse {
  0%{transform:scale(1);}
  50%{transform:scale(1.1);}
  100%{transform:scale(1);}
}
@keyframes fadein { from{opacity:0;} to{opacity:1;} }

/* Auto-open placeholder */
.auto-open .d2d-ww-label { display:block!important; }
/* Agent Panel */
#d2d-ww-panel {
  position:fixed;
  bottom:80px;
  right:20px;
  background:#fff;
  border-radius:12px;
  box-shadow:0 2px 10px rgba(0,0,0,0.15);
  padding:10px;
  width:220px;
  display:none;
  flex-direction:column;
  gap:8px;
}
#d2d-ww-panel.visible { display:flex; }
.d2d-agent-entry {
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:#333;
  padding:6px;
  border-radius:8px;
  transition:background .2s ease;
}
.d2d-agent-entry:hover { background:#f5f5f5; }
.d2d-agent-avatar {
  width:40px;
  height:40px;
  border-radius:50%;
  object-fit:cover;
}
/* === Chat Panel UI Polish === */
#d2d-ww-panel {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  width: 260px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  animation: slideUp .3s ease forwards;
}
#d2d-ww-panel.visible { display: flex; }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.d2d-panel-header {
  background: #25D366;
  color: #fff;
  font-size: 15px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}
.d2d-panel-header .d2d-close {
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  opacity: 0.9;
}
.d2d-panel-header .d2d-close:hover { opacity: 1; }

.d2d-agent-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #333;
  padding: 8px 10px;
  border-bottom: 1px solid #f1f1f1;
  transition: background .2s ease;
}
.d2d-agent-entry:hover { background: #f9f9f9; }

.d2d-agent-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
}
.d2d-agent-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #25D366;
}
.d2d-status {
  position: absolute;
  bottom: 2px;
  right: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
}
.d2d-status.online { background: #28c76f; }
.d2d-status.offline { background: #aaa; }

.d2d-agent-meta {
  font-size: 13px;
  line-height: 1.2em;
}
.d2d-agent-meta em {
  font-size: 11px;
  color: #777;
}
/* === Chat Panel Polished === */
#d2d-ww-panel {
  position:fixed;
  bottom:80px; right:20px;
  background:#fff;
  border-radius:16px;
  box-shadow:0 4px 14px rgba(0,0,0,0.15);
  width:260px;
  display:none;
  flex-direction:column;
  overflow:hidden;
  animation:slideUp .3s ease;
}
#d2d-ww-panel.visible { display:flex; }
@keyframes slideUp { from{transform:translateY(20px);opacity:0;} to{transform:translateY(0);opacity:1;} }
.d2d-panel-header {
  background:#25D366;color:#fff;padding:10px;
  display:flex;justify-content:space-between;align-items:center;
  font-weight:600;
}
.d2d-close { cursor
