.whatsapp-fab {
  position: relative;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.75rem;
  background: linear-gradient(145deg, #25d366 0%, #128c7e 100%);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-fab::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.45);
  animation: whatsapp-pulse 2s ease-out infinite;
  pointer-events: none;
}

.whatsapp-fab:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.55), 0 6px 16px rgba(0, 0, 0, 0.4);
}

.whatsapp-fab--hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.85);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.whatsapp-fab__badge {
  position: absolute;
  top: -0.0625rem;
  right: -0.0625rem;
  width: 0.875rem;
  height: 0.875rem;
  background: #ef4444;
  border: 2px solid #fff;
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4);
  animation: whatsapp-badge-pulse 2s ease-in-out infinite;
}

.whatsapp-fab__badge::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.55);
  animation: whatsapp-badge-ring 2s ease-out infinite;
  z-index: -1;
}

@keyframes whatsapp-badge-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

@keyframes whatsapp-badge-ring {
  0% {
    transform: scale(0.85);
    opacity: 0.75;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.whatsapp-fab__label {
  position: absolute;
  right: calc(100% + 0.75rem);
  white-space: nowrap;
  background: #0a0a0a;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.whatsapp-fab:hover .whatsapp-fab__label {
  opacity: 1;
  transform: translateX(0);
}

@keyframes whatsapp-pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.15);
    opacity: 0;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

.whatsapp-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.whatsapp-modal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.whatsapp-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.whatsapp-modal__panel {
  position: relative;
  width: 100%;
  max-width: 22rem;
  margin-bottom: 5rem;
  margin-right: 0.25rem;
  background: #0a0a0a;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(37, 211, 102, 0.15);
  transform: translateY(1.5rem) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
}

.whatsapp-modal.is-open .whatsapp-modal__panel {
  transform: translateY(0) scale(1);
}

.whatsapp-modal__header {
  background: linear-gradient(135deg, #075e54 0%, #128c7e 50%, #25d366 100%);
  padding: 1rem 3.25rem 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.whatsapp-modal__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: #fff;
  flex-shrink: 0;
}

.whatsapp-modal__avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.25rem;
}

.whatsapp-modal__header-text h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.125rem;
}

.whatsapp-modal__header-text p {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.whatsapp-modal__status {
  width: 0.5rem;
  height: 0.5rem;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 6px #4ade80;
}

.whatsapp-modal__close {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 10;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.whatsapp-modal__close:hover {
  background: rgba(0, 0, 0, 0.45);
}

.whatsapp-modal__body {
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}

.whatsapp-modal__bubble {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem 0.75rem 0.75rem 0.25rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
  color: #e5e7eb;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.whatsapp-modal__bubble strong {
  color: #fff;
}

.whatsapp-modal__options {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.whatsapp-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.whatsapp-option:hover {
  background: rgba(37, 211, 102, 0.12);
  border-color: rgba(37, 211, 102, 0.4);
}

.whatsapp-option i {
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.whatsapp-modal__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.3);
}

.whatsapp-modal__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.45);
}

.whatsapp-modal__dismiss {
  display: none;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.625rem;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.whatsapp-modal__dismiss:hover {
  color: #fff;
}

.whatsapp-modal__footer {
  margin-top: 0.625rem;
  text-align: center;
  font-size: 0.625rem;
  color: #6b7280;
  line-height: 1.35;
}

@media (min-width: 640px) {
  .whatsapp-modal {
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
  }

  .whatsapp-modal__panel {
    margin-bottom: 0;
    margin-right: 0;
    max-width: 24rem;
  }
}

@media (max-width: 639px) {
  .whatsapp-fab__label {
    display: none;
  }

  .whatsapp-modal {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
  }

  .whatsapp-modal__backdrop {
    cursor: pointer;
  }

  .whatsapp-modal__panel {
    margin-bottom: 0;
    margin-right: 0;
    max-width: 100%;
    width: 100%;
    border-radius: 1rem 1rem 0 0;
    max-height: min(78vh, 520px);
    transform: translateY(100%);
  }

  .whatsapp-modal.is-open .whatsapp-modal__panel {
    transform: translateY(0);
  }

  .whatsapp-modal__header-text h3 {
    font-size: 0.9375rem;
  }

  .whatsapp-modal__header-text p {
    font-size: 0.6875rem;
  }

  .whatsapp-modal__close {
    top: 0.5rem;
    right: 0.5rem;
  }

  .whatsapp-modal__dismiss {
    display: block;
  }
}
