/* ==========================================================================
   CERENE - Modern WhatsApp Interactive Chat Widget
   Target Phone: +52 993 156 2234
   ========================================================================== */

/* Container & Floating Button */
.wa-widget-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 99999;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.wa-float-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.45);
  cursor: pointer;
  border: none;
  outline: none;
  position: relative;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wa-float-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.6);
}

.wa-float-btn:active {
  transform: scale(0.95);
}

/* Pulse animation */
.wa-float-btn::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: wa-pulse 2s infinite ease-out;
  pointer-events: none;
}

@keyframes wa-pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.wa-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background-color: #ff3b30;
  color: white;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Tooltip popup hint */
.wa-tooltip {
  position: absolute;
  right: 75px;
  bottom: 12px;
  background: #ffffff;
  color: #0f172a;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.wa-widget-container:hover .wa-tooltip,
.wa-tooltip.wa-tooltip-show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Chat Window Modal */
.wa-chat-window {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 370px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99999;
}

.wa-chat-window.wa-chat-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Chat Header */
.wa-chat-header {
  background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
  color: #ffffff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.wa-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wa-avatar-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
}

.wa-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  padding: 2px;
}

.wa-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background-color: #25D366;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.wa-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.wa-status {
  font-size: 11.5px;
  opacity: 0.9;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wa-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.wa-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Chat Body */
.wa-chat-body {
  flex: 1;
  background-color: #efeae2;
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 0);
  background-size: 16px 16px;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wa-date-badge {
  align-self: center;
  background: rgba(255, 255, 255, 0.85);
  color: #54656f;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  margin-bottom: 4px;
}

/* Chat Bubbles */
.wa-msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 0px 14px 14px 14px;
  font-size: 13.5px;
  line-height: 1.45;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.wa-msg-received {
  align-self: flex-start;
  background: #ffffff;
  color: #111b21;
}

.wa-msg-sent {
  align-self: flex-end;
  background: #d9fdd3;
  color: #111b21;
  border-radius: 14px 0px 14px 14px;
}

.wa-msg-time {
  font-size: 10px;
  color: #667781;
  float: right;
  margin-top: 6px;
  margin-left: 10px;
}

/* Quick Action Chips */
.wa-quick-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.wa-chip {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(18, 140, 126, 0.25);
  color: #075e54;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.wa-chip:hover {
  background: #128C7E;
  color: #ffffff;
  border-color: #128C7E;
  transform: translateX(4px);
}

/* Chat Footer / Input */
.wa-chat-footer {
  background: #f0f2f5;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #e9edef;
}

.wa-input-field {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e9edef;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-family: inherit;
  color: #111b21;
  outline: none;
  transition: border-color 0.2s ease;
  resize: none;
  max-height: 80px;
}

.wa-input-field:focus {
  border-color: #128C7E;
}

.wa-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #128C7E;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.wa-send-btn:hover {
  background: #075E54;
  transform: scale(1.05);
}

.wa-send-btn:active {
  transform: scale(0.95);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .wa-chat-window {
    right: 16px;
    bottom: 90px;
    width: calc(100vw - 32px);
    height: 480px;
  }
  .wa-float-btn {
    width: 56px;
    height: 56px;
  }
}
