/* CONTENEDOR */
.chat-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
}

/* BOTON FLOTANTE */
.chat-toggle {
  width: 70px;
  height: 70px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../img/icon_chat.png');
  background-size: contain;
  background-repeat: no-repeat;
  transition: 0.2s;
}

.chat-toggle:hover {
  transform: scale(1.08);
}

/* MINI CHAT */
.mini-chat {
  width: 360px;
  max-width: 95vw;
  height: auto;
  max-height: 80vh;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;

  position: absolute;
  bottom: 75px;
  right: 0;

  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: 0.25s;
}

/* CUANDO ESTA ACTIVO */
.mini-chat.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* HEADER */
.mini-chat-header {
  background: #002060;
  color: white;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

.chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

/* BODY */
.mini-chat-body {
  padding: 15px;
  overflow-y: auto;
}

/* FORMULARIO */
.mini-chat-body form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* INPUTS Y BOTÓN ya vienen de tu estilo anterior */



/* ===== FORMULARIO MODERNO ===== */

.mini-chat-body form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Labels */
.mini-chat-body label {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

/* Inputs */
.mini-chat-body input,
.mini-chat-body select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid #dcdcdc;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #f9fafb;
}

/* Focus elegante */
.mini-chat-body input:focus,
.mini-chat-body select:focus {
  border-color: #002060;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0,32,96,0.15);
}

/* Placeholder */
.mini-chat-body input::placeholder {
  color: #aaa;
}

/* Botón */
.mini-chat-body button {
  margin-top: 6px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #002060, #0040c0);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.mini-chat-body button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

/* Contador */
.char-count {
  font-size: 11px;
  color: #777;
  text-align: right;
  margin-top: -6px;
}

/* ERRORES */
.error {
  font-size: 11px;
  color: #dc2626;
  margin-top: -6px;
  display: none;
}

/* Input en error */
.input-error {
  border-color: #dc2626 !important;
  background-color: #fff5f5 !important;
}

/* Mostrar error */
.error.active {
  display: block;
}

/* Animación suave */
.mini-chat {
  animation: fadeInUp 0.25s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}