/* ---------- helper ---------- */
.hidden {
  display: none !important;
}

/* ---------- floating button ---------- */
#wave-whatsapp-button {
  position: fixed;
  bottom: 20px;
  width: 64px;
  height: 64px;
  background: #25d366;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

/* Custom image button - replaces the entire circle */
#wave-whatsapp-button.wave-custom-image {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  width: auto;
  height: auto;
  padding: 0;
}

#wave-whatsapp-button.wave-custom-image .wave-custom-icon {
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  display: block;
}

#wave-whatsapp-button.side-right {
  right: 20px;
}
#wave-whatsapp-button.side-left {
  left: 20px;
}
#wave-whatsapp-button svg {
  pointer-events: none;
}

/* hover / focus / active */
#wave-whatsapp-button:hover,
#wave-whatsapp-button:focus {
  transform: scale(1.06);
}
#wave-whatsapp-button:active {
  transform: scale(0.95);
  background: #1ebe55;
}

/* ---------- chat window ---------- */
#wave-whatsapp-chat {
  position: fixed;
  bottom: 100px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  font-family: Arial, Helvetica, sans-serif;
  direction: rtl;
  z-index: 9999;
  transition: opacity 0.2s ease, transform 0.2s ease;
  opacity: 1;
  transform: translateY(0);
}
#wave-whatsapp-chat.hidden {
  opacity: 0;
  transform: translateY(8px);
}
#wave-whatsapp-chat.side-right {
  right: 20px;
}
#wave-whatsapp-chat.side-left {
  left: 20px;
}

/* ---------- header ---------- */
.wave-header {
  background: #075e54;
  color: #fff;
  padding: 8px 10px;
  border-radius: 10px 10px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.wave-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  border-radius: 50%;
  transition: background 0.15s ease;
}
.wave-close:hover,
.wave-close:focus {
  background: rgba(255, 255, 255, 0.15);
}
.wave-close:focus {
  outline: 2px solid #c8fdeb;
  outline-offset: 2px;
}

/* ---------- bubbles ---------- */
.wave-body {
  padding: 10px;
  overflow-y: auto;
}
.wave-bubble {
  display: block;
  padding: 8px 12px;
  border-radius: 8px 8px 8px 0;
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.4;
  width: calc(100% - 24px);
  max-width: calc(100% - 24px);
  box-sizing: border-box;
}
.wave-bubble-agent {
  background: #e1ffc7;
  color: #000;
}

/* typing indicator */
.wave-bubble-typing {
  background: #e1ffc7;
  padding: 6px 10px;
}
.wave-bubble-typing .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 1px;
  background: #25d366;
  border-radius: 50%;
  animation: waveTyping 1.4s infinite ease-in-out;
}
.wave-bubble-typing .dot:nth-child(2) {
  animation-delay: 0.2s;
}
.wave-bubble-typing .dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes waveTyping {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* ---------- forms ---------- */
.wave-form {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.wave-form input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wave-form input:focus {
  border-color: #25d366;
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.25);
  outline: none;
}
.wave-form button {
  background: #25d366;
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wave-form button:hover,
.wave-form button:focus {
  background: #1ebe55;
}
.wave-form button:active {
  transform: scale(0.96);
}
.wave-form button:focus {
  outline: 2px solid #c8fdeb;
  outline-offset: 2px;
}

.wave-thank-you {
  background: #dcf8c6;
}
