/* ===========================
   CASA CONSUELO CHATBOT 2.0
   =========================== */

/* PALETA */
:root {
  --cc-primary: #1c7ed6;
  --cc-secondary: #1971c2;
  --cc-bg: #f8f9fa;
  --cc-text: #2b2f33;
  --cc-border: #e9ecef;
  --cc-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  --cc-radius: 16px;
}

/* WIDGET PRINCIPAL */
#cc-chatbot-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  z-index: 99999;
}

/* BOTÓN DE BURBUJA */
#cc-chat-button {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--cc-primary), var(--cc-secondary));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px 18px;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(25, 113, 194, 0.3);
  transition: all 0.3s ease;
}

#cc-chat-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(25, 113, 194, 0.4);
}

#cc-chat-button span {
  font-weight: 600;
  font-size: 15px;
}

/* VENTANA DEL CHAT */
#cc-chat-window {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 360px;
  height: 520px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  border: 1px solid var(--cc-border);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
}

#cc-chat-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* HEADER */
#cc-chat-header {
  background: linear-gradient(135deg, var(--cc-secondary), var(--cc-primary));
  color: white;
  padding: 15px 20px;
  border-radius: var(--cc-radius) var(--cc-radius) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cc-avatar {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.cc-header-text .cc-name {
  font-weight: 600;
  font-size: 16px;
}

.cc-header-text .cc-status {
  font-size: 12px;
  opacity: 0.9;
}

/* MENSAJES */
#cc-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--cc-bg);
}

.cc-message {
  display: flex;
  margin-bottom: 14px;
  animation: fadeIn 0.3s ease;
}

.cc-message.user {
  flex-direction: row-reverse;
}

.cc-message-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0 10px;
}

.cc-message.bot .cc-message-avatar {
  background: var(--cc-primary);
  color: white;
}

.cc-message.user .cc-message-avatar {
  background: #6c757d;
  color: white;
}

.cc-message-content {
  max-width: 260px;
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 14px;
  border: 1px solid var(--cc-border);
  background: white;
  color: var(--cc-text);
  position: relative;
}

.cc-message.user .cc-message-content {
  background: var(--cc-secondary);
  color: white;
  border: none;
}

/* INPUT */
#cc-chat-form {
  padding: 14px;
  background: white;
  border-top: 1px solid var(--cc-border);
  border-radius: 0 0 var(--cc-radius) var(--cc-radius);
}

#cc-chat-input-container {
  display: flex;
  align-items: flex-end;
  background: var(--cc-bg);
  border-radius: 25px;
  border: 1px solid var(--cc-border);
  padding: 8px 10px;
}

#cc-chat-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  padding: 8px;
}

#cc-chat-send {
  background: var(--cc-primary);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

#cc-chat-send:hover {
  background: var(--cc-secondary);
}

/* ANIMACIÓN */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 480px) {
  #cc-chat-window {
    width: 95%;
    height: 70vh;
    right: 2.5%;
  }
}
