/**
 * WhatsApp Floating Button Widget
 * Reusable component for any website
 */

/* Floating button */
.wa-float-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wa-float-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.wa-float-button:active {
  transform: scale(1.05);
}

.wa-float-button svg {
  width: 35px;
  height: 35px;
  fill: #ffffff;
}

/* Popup container */
.wa-popup {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 320px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.wa-popup.wa-show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Popup header */
.wa-popup-header {
  background-color: #128C7E;
  color: #ffffff;
  padding: 16px;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wa-popup-header svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
  flex-shrink: 0;
}

.wa-popup-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Popup body */
.wa-popup-body {
  padding: 20px;
}

.wa-popup-message {
  color: #333333;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* WhatsApp button */
.wa-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background-color: #25D366;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  text-decoration: none;
}

.wa-button:hover {
  background-color: #20BA5A;
}

.wa-button:active {
  transform: scale(0.98);
}

.wa-button svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

/* Close button */
.wa-close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
  padding: 0;
  line-height: 1;
}

.wa-close-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile responsive */
@media (max-width: 480px) {
  .wa-popup {
    width: calc(100vw - 40px);
    right: 20px;
    left: 20px;
    bottom: 90px;
  }

  .wa-float-button {
    width: 56px;
    height: 56px;
    bottom: 16px;
    right: 16px;
  }

  .wa-float-button svg {
    width: 32px;
    height: 32px;
  }
}
