/* =====================================================
   ESTETIKA WA FLOATING – PRO STYLING
   ===================================================== */

/* ROOT & RESET */
.edc-wa-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 99999; /* Pastikan di atas elemen lain */
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

.edc-wa-float * {
  box-sizing: border-box;
}

.edc-wa-float img {
  max-width: none !important;
  display: block;
  margin: 0;
  border: none;
  box-shadow: none;
}

/* =====================================================
   FLOATING BUTTON (Main Trigger)
   ===================================================== */
.edc-wa-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #9ED24A; /* Fallback color */
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  position: relative;
  z-index: 2;
  
  /* Animasi Denyut (Pulse) */
  animation: edc-pulse 3s infinite;
}

.edc-wa-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.edc-wa-btn img {
  width: 30px !important;
  height: 30px !important;
  object-fit: contain;
}

/* Keyframes Pulse */
@keyframes edc-pulse {
  0% { box-shadow: 0 0 0 0 rgba(158, 210, 74, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(158, 210, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(158, 210, 74, 0); }
}

/* =====================================================
   PANEL CONTAINER
   ===================================================== */
.edc-wa-panel {
  position: absolute;
  bottom: 80px; /* Di atas tombol */
  left: 0;
  width: 320px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  
  /* Animasi Masuk/Keluar */
  transform-origin: bottom left;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.edc-wa-panel.active {
  transform: scale(1) translateY(0);
  opacity: 1;
  visibility: visible;
}

/* =====================================================
   HEADER SECTION
   ===================================================== */
.edc-wa-header {
  background-color: #9ED24A; /* Fallback */
  color: #fff;
  padding: 24px 20px 20px;
  position: relative;
}

.edc-wa-header h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.edc-wa-header p {
  margin: 0;
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.5;
  color: rgba(255,255,255,0.9);
}

/* Tombol Close (X) */
.edc-wa-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.edc-wa-close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(90deg);
}

/* =====================================================
   CONTACT LIST
   ===================================================== */
.edc-wa-list {
  padding: 10px 0;
  max-height: 350px;
  overflow-y: auto;
  /* Scrollbar halus */
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}

.edc-wa-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.edc-wa-item:last-child {
  border-bottom: none;
}

.edc-wa-item:hover {
  background-color: #f9f9f9;
}

/* Avatar Inisial */
.edc-wa-avatar {
  width: 40px;
  height: 40px;
  background: #f0f5e5;
  color: #6a9c24;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin-right: 15px;
  flex-shrink: 0;
}

/* Info Text */
.edc-wa-info {
  flex: 1;
}

.edc-wa-info strong {
  display: block;
  font-size: 15px;
  color: #333;
  margin-bottom: 2px;
}

.edc-wa-info small {
  display: block;
  font-size: 12px;
  color: #888;
}

/* Icon Kecil WA di kanan */
.edc-wa-icon-small {
  width: 20px !important;
  height: 20px !important;
  opacity: 0.3;
  filter: grayscale(100%);
  transition: 0.2s;
}

.edc-wa-item:hover .edc-wa-icon-small {
  opacity: 1;
  filter: grayscale(0%);
  transform: translateX(3px);
}

/* =====================================================
   RESPONSIVE (MOBILE)
   ===================================================== */
@media (max-width: 480px) {
  .edc-wa-panel {
    width: calc(100vw - 48px); /* Full width minus margin */
    bottom: 90px;
  }
}