/* ═══════════════════════════════════════════
   WhatsApp MultiChat — wmc-style.css
   ═══════════════════════════════════════════ */

:root {
  --wmc-green:    #25D366;
  --wmc-green-dk: #128C7E;
  --wmc-radius:   18px;
  --wmc-shadow:   0 8px 32px rgba(0,0,0,.22);
  --wmc-font:     -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Wrapper ── */
#wmc-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: var(--wmc-font);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

/* ── FAB ── */
#wmc-fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--wmc-green);
  border: none;
  cursor: pointer;
  box-shadow: var(--wmc-shadow), 0 0 0 0 rgba(37,211,102,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform .2s, box-shadow .2s;
  animation: wmc-pulse 2.8s infinite;
  outline: none;
}
#wmc-fab:hover { transform: scale(1.08); }
#wmc-fab:active { transform: scale(.95); }

#wmc-fab-wa,
#wmc-fab-close {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .25s, transform .25s;
}
#wmc-fab-wa svg   { width: 32px; height: 32px; fill: #fff; }
#wmc-fab-close svg { width: 24px; height: 24px; stroke: #fff; }

/* estado cerrado */
#wmc-fab-close { opacity: 0; transform: rotate(-90deg) scale(.6); }

/* estado abierto */
#wmc-wrapper.open #wmc-fab-wa    { opacity: 0; transform: rotate(90deg) scale(.6); }
#wmc-wrapper.open #wmc-fab-close { opacity: 1; transform: rotate(0)     scale(1);  }
#wmc-wrapper.open #wmc-fab { animation: none; box-shadow: var(--wmc-shadow); background: #075E54; }

/* badge */
#wmc-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  transition: transform .2s, opacity .2s;
}
#wmc-wrapper.open #wmc-badge { transform: scale(0); opacity: 0; }

@keyframes wmc-pulse {
  0%   { box-shadow: var(--wmc-shadow), 0 0 0 0   rgba(37,211,102,.45); }
  70%  { box-shadow: var(--wmc-shadow), 0 0 0 14px rgba(37,211,102,0);  }
  100% { box-shadow: var(--wmc-shadow), 0 0 0 0   rgba(37,211,102,0);   }
}

/* ── Panel ── */
#wmc-panel {
  width: 320px;
  background: #fff;
  border-radius: var(--wmc-radius);
  box-shadow: var(--wmc-shadow);
  overflow: hidden;
  transform-origin: bottom right;
  transition: opacity .28s cubic-bezier(.4,0,.2,1),
              transform .28s cubic-bezier(.4,0,.2,1);
  opacity: 1;
  transform: scale(1) translateY(0);
}
#wmc-panel.wmc-hidden {
  opacity: 0;
  transform: scale(.88) translateY(16px);
  pointer-events: none;
}

/* ── Header ── */
#wmc-header {
  background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
#wmc-header-icon {
  width: 42px; height: 42px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
#wmc-header-icon svg { width: 24px; height: 24px; fill: #fff; }

#wmc-header-text { flex: 1; }
#wmc-title {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}
#wmc-subtitle {
  display: block;
  color: rgba(255,255,255,.75);
  font-size: 12px;
  margin-top: 2px;
}

#wmc-close {
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 50%;
  width: 30px; height: 30px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
#wmc-close:hover { background: rgba(255,255,255,.28); }
#wmc-close svg { width: 16px; height: 16px; stroke: #fff; }

/* ── Contacts ── */
#wmc-contacts { padding: 8px 0; }

.wmc-contact {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 16px;
  text-decoration: none;
  transition: background .15s;
  position: relative;
}
.wmc-contact:hover { background: #f0fdf4; }
.wmc-contact:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0; left: 71px; right: 16px;
  height: 1px;
  background: #f3f4f6;
}

/* Avatar */
.wmc-avatar {
  position: relative;
  flex-shrink: 0;
  width: 46px; height: 46px;
}
.wmc-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--acc, var(--wmc-green));
}
.wmc-initial {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--acc, var(--wmc-green));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: .5px;
}
.wmc-online {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 12px; height: 12px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #fff;
  animation: wmc-blink 2s infinite;
}
@keyframes wmc-blink {
  0%,100% { opacity: 1; }
  50%      { opacity: .5; }
}

/* Info */
.wmc-info { flex: 1; min-width: 0; }
.wmc-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wmc-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
.wmc-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

/* Arrow */
.wmc-arrow { flex-shrink: 0; }
.wmc-arrow svg {
  width: 16px; height: 16px;
  stroke: #d1d5db;
  transition: stroke .15s, transform .15s;
}
.wmc-contact:hover .wmc-arrow svg {
  stroke: var(--wmc-green);
  transform: translateX(2px);
}

/* ── Footer ── */
#wmc-footer {
  background: #f9fafb;
  border-top: 1px solid #f3f4f6;
  padding: 9px 16px;
  font-size: 11px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
#wmc-footer svg { width: 12px; height: 12px; fill: var(--wmc-green); }

/* ── Mobile ── */
@media (max-width: 480px) {
  #wmc-wrapper { bottom: 16px; right: 16px; }
  #wmc-panel   { width: calc(100vw - 32px); }
}
