/* WhatsApp widget styles */
#whatsapp-widget-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
  font-family: var(--font-body, 'Garet-Regular', sans-serif);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#whatsapp-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1ba9a9 0%, #25d366 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 10px 40px rgba(27, 169, 169, 0.35);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#whatsapp-button:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 15px 50px rgba(27, 169, 169, 0.45);
}

.whatsapp-icon {
  width: 28px;
  height: 28px;
  display: block;
}

.whatsapp-badge {
  display: none;
}

.whatsapp-box {
  width: 300px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 60px rgba(0, 0, 0, 0.25);
  margin-bottom: 16px;
  position: absolute;
  right: 0;
  bottom: 80px;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.whatsapp-box.hidden {
  display: none !important;
}

.whatsapp-header {
  background: linear-gradient(135deg, #1ba9a9 0%, #00c7a9 100%);
  color: #ffffff;
  padding: 14px 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.whatsapp-header-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.whatsapp-header-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.whatsapp-header-status {
  font-size: 0.75rem;
  opacity: 0.88;
  font-weight: 500;
}

.whatsapp-close-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

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

.whatsapp-close-btn svg {
  width: 16px;
  height: 16px;
}

.whatsapp-greeting {
  padding: 16px 14px 12px;
  background: #f9f9f9;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.whatsapp-greeting-title {
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 700;
  color: #222220;
}

.whatsapp-greeting-message,
.whatsapp-reply-time {
  font-size: 0.8rem;
  color: #555555;
  line-height: 1.5;
}

.whatsapp-greeting-message {
  margin-bottom: 12px;
}

.whatsapp-reply-time {
  opacity: 0.75;
  font-size: 0.85rem;
}

.whatsapp-messages {
  height: 150px;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #ffffff;
}

.whatsapp-message {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.whatsapp-message.user-message {
  align-self: flex-end;
  background: #dcf8c6;
  color: #222220;
  max-width: 85%;
  word-wrap: break-word;
}

.whatsapp-footer {
  padding: 12px 14px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.whatsapp-input-area {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.whatsapp-input {
  flex: 1;
  min-height: 36px;
  max-height: 80px;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  resize: none;
  font-family: var(--font-body, 'Garet-Regular', sans-serif);
  font-size: 0.85rem;
  color: #222220;
  line-height: 1.3;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-input::placeholder {
  color: #999999;
  font-size: 0.9rem;
}

.whatsapp-input:focus {
  outline: none;
  border-color: rgba(27, 169, 169, 0.6);
  box-shadow: 0 0 0 3px rgba(27, 169, 169, 0.1);
}

.whatsapp-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #1ba9a9 0%, #25d366 100%);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.whatsapp-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(27, 169, 169, 0.3);
}

.whatsapp-send-btn svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 480px) {
  #whatsapp-widget-container {
    right: 16px;
    bottom: 16px;
  }

  .whatsapp-box {
    width: min(100vw - 32px, 320px);
    bottom: 70px;
  }
}
