/* ── Veclera WhatsApp Chat Widget ── */
:root {
  --vw-green:   #25D366;
  --vw-green-dk:#128C7E;
  --vw-dark:    #0B0F0E;
  --vw-bubble:  #DCF8C6;
  --vw-white:   #fff;
  --vw-muted:   #8A9090;
  --vw-radius:  18px;
  --vw-shadow:  0 12px 40px rgba(0,0,0,.28);
}

/* ── FAB Button ── */
.vw-fab {
  position: fixed;
  bottom: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--vw-green);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 22px 14px 18px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(37,211,102,.45);
  transition: all .25s;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}
.vw-fab:hover { background: var(--vw-green-dk); transform: translateY(-2px); box-shadow: 0 10px 32px rgba(37,211,102,.5); }
.vw-fab.vw-pos--left  { left: 24px; }
.vw-fab.vw-pos--right { right: 24px; }
.vw-fab svg { width: 22px; height: 22px; flex-shrink: 0; }
.vw-fab__label { white-space: nowrap; }

/* Unread badge */
.vw-badge {
  position: absolute;
  top: -6px; right: -6px;
  width: 20px; height: 20px;
  background: #e74c3c;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  animation: vwPulse 2s infinite;
}
@keyframes vwPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.2)} }

/* ── Chat Panel ── */
.vw-panel {
  position: fixed;
  bottom: 96px;
  z-index: 9998;
  width: 340px;
  border-radius: var(--vw-radius);
  background: #f0f0f0;
  box-shadow: var(--vw-shadow);
  overflow: hidden;
  display: none;
  flex-direction: column;
  transform: translateY(12px);
  opacity: 0;
  transition: opacity .3s, transform .3s;
}
.vw-panel.vw-pos--left  { left: 24px; }
.vw-panel.vw-pos--right { right: 24px; }
.vw-panel.vw-open { display: flex; opacity: 1; transform: translateY(0); }

/* Header */
.vw-header {
  background: var(--vw-green-dk);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.vw-header__avatar-wrap { position: relative; flex-shrink: 0; }
.vw-header__avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.3);
  background: #0E7C7B;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.vw-status-dot {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--vw-green-dk);
}
.vw-status-dot--online  { background: #44c767; }
.vw-status-dot--offline { background: #bbb; }
.vw-header__info { flex: 1; }
.vw-header__name   { font-size: 15px; font-weight: 700; color: #fff; }
.vw-header__role   { font-size: 11px; color: rgba(255,255,255,.75); margin-top: 1px; }
.vw-header__status { font-size: 11px; color: rgba(255,255,255,.65); margin-top: 2px; }
.vw-header__close {
  background: none; border: none;
  color: rgba(255,255,255,.7);
  font-size: 20px; cursor: pointer;
  line-height: 1; padding: 0;
  transition: color .2s;
}
.vw-header__close:hover { color: #fff; }

/* WA pattern bg */
.vw-body {
  background: #e5ddd5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' opacity='.04'%3E%3Ctext y='40' font-size='32'%3E💬%3C/text%3E%3C/svg%3E");
  padding: 16px 14px;
  flex: 1;
}

/* Chat bubble */
.vw-bubble {
  background: #fff;
  border-radius: 0 12px 12px 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: #111;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  max-width: 90%;
  white-space: pre-wrap;
  position: relative;
}
.vw-bubble__time {
  font-size: 10px;
  color: #999;
  text-align: right;
  margin-top: 4px;
}

/* Quick replies */
.vw-quickreplies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.vw-quickreply {
  background: #fff;
  border: 1.5px solid var(--vw-green);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--vw-green-dk);
  cursor: pointer;
  text-align: left;
  transition: all .2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}
.vw-quickreply:hover {
  background: var(--vw-green);
  color: #fff;
  border-color: var(--vw-green);
  transform: translateX(3px);
}
.vw-quickreply::before { content: '↗'; font-size: 12px; }

/* Footer */
.vw-footer {
  background: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #e0e0e0;
}
.vw-input {
  flex: 1;
  border: none;
  background: #f0f0f0;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.vw-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--vw-green);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
}
.vw-send:hover { background: var(--vw-green-dk); }
.vw-send svg { width: 18px; height: 18px; fill: #fff; }

/* Powered by */
.vw-powered {
  text-align: center;
  font-size: 10px;
  color: #aaa;
  padding: 6px 0 8px;
  background: #fff;
}

/* ── Responsive ── */
@media (max-width: 400px) {
  .vw-panel { width: calc(100vw - 32px); left: 16px!important; right: 16px!important; }
  .vw-fab__label { display: none; }
  .vw-fab { padding: 14px; border-radius: 50%; }
}
