#cw-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#cw-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 320px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  overflow: hidden;
  transform: translateY(10px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#cw-panel.cw-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.cw-header {
  background: #1a1a2e;
  color: #fff;
  padding: 18px 20px;
}

.cw-header-title {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 600;
}

.cw-header-sub {
  margin: 0;
  font-size: 12px;
  opacity: 0.75;
}

.cw-channels {
  padding: 6px 0;
}

.cw-row {
  display: flex;
  align-items: center;
  padding: 13px 20px;
  cursor: pointer;
  border: none;
  border-bottom: 1px solid #f2f2f2;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  box-sizing: border-box;
}

.cw-row:last-child {
  border-bottom: none;
}

.cw-row:hover {
  background: #f7f7f7;
}

.cw-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 14px;
}

.cw-icon--chat      { background: #4f46e5; }
.cw-icon--wa        { background: #25D366; }
.cw-icon--messenger { background: #0084ff; }
.cw-icon--instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.cw-icon--email     { background: #ea4335; }

.cw-icon svg {
  width: 19px;
  height: 19px;
  fill: #fff;
}

.cw-text { flex: 1; min-width: 0; }

.cw-name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 2px;
  color: #1a1a2e;
}

.cw-desc {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cw-arrow {
  color: #ccc;
  font-size: 20px;
  margin-left: 8px;
  line-height: 1;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.cw-arrow.cw-rotated { transform: rotate(90deg); }

.cw-iframe-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  padding: 0 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #f2f2f2;
}

.cw-iframe-wrap.cw-open {
  max-height: 80px;
  padding: 12px 20px;
}

.cw-iframe-wrap iframe { display: block; border: 0; }

iframe#launcher {
  opacity: 0 !important;
  pointer-events: none !important;
}

#cw-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1a1a2e;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.28);
  transition: background 0.2s, transform 0.2s;
  position: relative;
  margin-left: auto;
}

#cw-toggle:hover {
  transform: scale(1.08);
  background: #2d2d4e;
}

#cw-toggle svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  position: absolute;
  transition: opacity 0.2s, transform 0.2s;
}

#cw-toggle .cw-icon-chat  { opacity: 1; transform: scale(1) rotate(0deg); }
#cw-toggle .cw-icon-close { opacity: 0; transform: scale(0.5) rotate(-90deg); }

#cw-toggle.cw-open .cw-icon-chat,
#cw-toggle.cw-zd-open .cw-icon-chat  { opacity: 0; transform: scale(0.5) rotate(90deg); }

#cw-toggle.cw-open .cw-icon-close,
#cw-toggle.cw-zd-open .cw-icon-close { opacity: 1; transform: scale(1) rotate(0deg); }

