/* WhatsApp Widget Styles */
.whatsapp-widget {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  z-index: 9999;
}

/* Icon Style */
.whatsapp-icon-style {
  position: fixed;
  z-index: 9999;
}

.whatsapp-icon-style.whatsapp-bottom-right {
  bottom: 20px;
  right: 20px;
}

.whatsapp-icon-style.whatsapp-bottom-left {
  bottom: 20px;
  left: 20px;
}

.whatsapp-icon-style.whatsapp-top-right {
  top: 20px;
  right: 20px;
}

.whatsapp-icon-style.whatsapp-top-left {
  top: 20px;
  left: 20px;
}

.whatsapp-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
}

.whatsapp-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Button Style */
.whatsapp-button-style {
  display: inline-block;
  margin: 10px 0;
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.whatsapp-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: inherit;
}

/* Botão Flutuante com Pulse */
.whatsapp-float-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.whatsapp-float-button:hover {
  transform: scale(1.1);
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid #25d366;
  border-radius: 50%;
  animation: pulse 2s infinite;
  opacity: 0.6;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* Multi User Style - Posicionamento Correto */
.whatsapp-multi-style {
  position: fixed;
  z-index: 9999;
}

.whatsapp-multi-style.whatsapp-bottom-right {
  bottom: 20px;
  right: 20px;
}

.whatsapp-multi-style.whatsapp-bottom-left {
  bottom: 20px;
  left: 20px;
}

.whatsapp-multi-style.whatsapp-top-right {
  top: 20px;
  right: 20px;
}

.whatsapp-multi-style.whatsapp-top-left {
  top: 20px;
  left: 20px;
}

/* Container Multi-usuário - Novo Design baseado na imagem */
.whatsapp-multi-container {
  position: absolute;
  width: 350px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  animation: slideInUp 0.3s ease-out;
}

/* Posicionamento do container baseado na posição do botão */
.whatsapp-multi-style.whatsapp-bottom-right .whatsapp-multi-container {
  bottom: 70px;
  right: 0;
}

.whatsapp-multi-style.whatsapp-bottom-left .whatsapp-multi-container {
  bottom: 70px;
  left: 0;
}

.whatsapp-multi-style.whatsapp-top-right .whatsapp-multi-container {
  top: 70px;
  right: 0;
}

.whatsapp-multi-style.whatsapp-top-left .whatsapp-multi-container {
  top: 70px;
  left: 0;
}

/* Header com novo design */
.whatsapp-multi-header {
  padding: 20px;
  position: relative;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.header-content {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.whatsapp-logo {
  flex-shrink: 0;
  margin-top: 2px;
}

.header-text h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
  color: white;
}

.header-text p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

.close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Subtitle */
.whatsapp-subtitle {
  padding: 15px 20px 10px;
  background: #f8f9fa;
}

.whatsapp-subtitle p {
  margin: 0;
  font-size: 13px;
  color: #6c757d;
  text-align: center;
}

/* Lista de usuários com novo design */
.whatsapp-multi-list {
  padding: 10px 0;
  max-height: 400px;
  overflow-y: auto;
}

.whatsapp-user-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s ease;
  position: relative;
  border: none;
}

.whatsapp-user-item:hover {
  background-color: #f8f9fa;
  text-decoration: none;
  color: #333;
}

/* Indicador de borda lateral */
.user-border-indicator {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.user-border-indicator.online {
  background-color: #25d366;
}

.user-border-indicator.offline {
  background-color: #dee2e6;
}

/* Avatar grande */
.user-avatar-large {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 18px;
  margin-right: 15px;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Informações detalhadas do usuário */
.user-info-detailed {
  flex: 1;
  min-width: 0;
}

.user-name-large {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  line-height: 1.3;
}

.user-department-large {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 2px;
}

/* Status Message com badges */
.user-status-message {
  margin-top: 8px;
}

.status-indicator-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-indicator-badge.online {
  background-color: #e8f5e8;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.status-indicator-badge.offline {
  background-color: #f5f5f5;
  color: #757575;
  border: 1px solid #e0e0e0;
}

/* Remove a mensagem offline antiga */
.user-offline-message {
  display: none;
}

/* Ícone do WhatsApp */
.whatsapp-icon-container {
  margin-left: 15px;
  flex-shrink: 0;
}

.whatsapp-contact-icon {
  transition: transform 0.2s ease;
}

.whatsapp-user-item:hover .whatsapp-contact-icon {
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
  .whatsapp-multi-container {
    width: 320px;
  }

  .whatsapp-multi-style.whatsapp-bottom-right,
  .whatsapp-multi-style.whatsapp-bottom-left {
    bottom: 10px;
    right: 10px;
    left: auto;
  }

  .whatsapp-multi-style.whatsapp-bottom-right .whatsapp-multi-container,
  .whatsapp-multi-style.whatsapp-bottom-left .whatsapp-multi-container {
    bottom: 70px;
    right: 0;
    left: auto;
  }

  .whatsapp-multi-style.whatsapp-top-right,
  .whatsapp-multi-style.whatsapp-top-left {
    top: 10px;
    right: 10px;
    left: auto;
  }

  .whatsapp-multi-style.whatsapp-top-right .whatsapp-multi-container,
  .whatsapp-multi-style.whatsapp-top-left .whatsapp-multi-container {
    top: 70px;
    right: 0;
    left: auto;
  }

  .header-content {
    flex-direction: column;
    gap: 10px;
  }

  .header-text {
    text-align: center;
  }
}

/* Animation */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Avatar padrão */
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 16px;
  margin-right: 12px;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-avatar.small {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

/* Smooth animations */
.whatsapp-icon {
  transition: all 0.3s ease;
}

.whatsapp-icon:hover {
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%,
  20%,
  60%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  80% {
    transform: translateY(-5px);
  }
}
