/* ========== WIDGET FLOTANTE WHATSAPP ========== */
.whatsapp-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.whatsapp-btn {
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 35px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-btn:hover {
  transform: scale(1.1);
}

.whatsapp-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #25D366;
  z-index: -1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

.whatsapp-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #E63946;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid white;
}

.whatsapp-tooltip {
  position: absolute;
  right: 75px;
  background: white;
  padding: 8px 15px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s;
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent white;
}

.whatsapp-widget:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ========== PANEL DEL CHAT BOT ========== */
.bot-panel {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 350px;
  max-width: calc(100vw - 48px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background: #E5DDD5;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
  background-repeat: repeat;
  background-size: cover;
}

.bot-panel.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.bot-header {
  background: #075E54;
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bot-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bot-avatar {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #075E54;
  font-size: 20px;
}

.bot-info h3 {
  font-size: 16px;
  margin: 0 0 2px 0;
  font-weight: 600;
}

.bot-status {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 5px;
}

.bot-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #25D366;
  border-radius: 50%;
  display: inline-block;
}

.close-bot {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.close-bot:hover {
  opacity: 1;
}

.bot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  max-width: 85%;
  padding: 10px 15px;
  border-radius: 10px;
  position: relative;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  word-wrap: break-word;
}

.message.bot {
  background: white;
  align-self: flex-start;
  border-top-left-radius: 0;
}

.message.bot::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  border-width: 0 8px 8px 0;
  border-style: solid;
  border-color: transparent white transparent transparent;
}

.message.user {
  background: #DCF8C6;
  align-self: flex-end;
  border-top-right-radius: 0;
}

.message.user::before {
  content: '';
  position: absolute;
  top: 0;
  right: -8px;
  border-width: 0 0 8px 8px;
  border-style: solid;
  border-color: transparent transparent transparent #DCF8C6;
}

.msg-time {
  display: block;
  font-size: 10px;
  color: #999;
  text-align: right;
  margin-top: 5px;
}

.bot-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.bot-option-btn {
  background: white;
  border: 1px solid #128C7E;
  color: #128C7E;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.bot-option-btn:hover {
  background: #128C7E;
  color: white;
}

.bot-option-btn.primary {
  background: #25D366;
  color: white;
  border-color: #25D366;
  font-weight: bold;
  padding: 12px;
  font-size: 15px;
}

.bot-input-area {
  padding: 15px;
  background: #f0f0f0;
  display: flex;
  gap: 10px;
  align-items: center;
}

.bot-input {
  flex: 1;
  padding: 12px 15px;
  border: none;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
}

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

.bot-send-btn:hover {
  background: #075E54;
}
