/* chatbot.css — botón flotante + panel del Asistente COGEP. */

#chat-boton {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1070;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--bs-primary), var(--cogep-dorado-2, #a9864a));
  color: #15110d;
  font-size: 24px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;
}
#chat-boton:hover { transform: scale(1.08); box-shadow: 0 10px 26px rgba(0,0,0,0.35); }
#chat-boton:active { transform: scale(0.94); }

#chat-panel {
  position: fixed;
  right: 18px;
  bottom: 86px;
  z-index: 1070;
  width: 360px;
  max-width: calc(100vw - 36px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background: var(--cogep-panel);
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
#chat-panel.abierto { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

#chat-panel header {
  flex-shrink: 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--bs-primary), var(--cogep-dorado-2, #a9864a));
  color: #15110d;
  display: flex;
  align-items: center;
  gap: 10px;
}
#chat-panel header .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(21,17,13,0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px;
}
#chat-panel header .titulos { flex: 1; min-width: 0; }
#chat-panel header .titulos strong { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.98rem; line-height: 1.2; }
#chat-panel header .titulos span { display: block; font-size: 0.72rem; opacity: .8; }
#chat-panel header button {
  background: none; border: none; color: #15110d; opacity: .7; font-size: 18px; line-height: 1; cursor: pointer;
}
#chat-panel header button:hover { opacity: 1; }

#chat-cuerpo {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-size: 0.88rem;
  animation: chatAparece .2s ease both;
}
@keyframes chatAparece { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.chat-intro {
  margin: 0 0 12px;
  font-weight: 600;
  color: var(--bs-body-color);
}
.chat-lista { display: flex; flex-direction: column; gap: 8px; }
.chat-opcion {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--bs-border-color);
  background: var(--cogep-hover, rgba(0,0,0,0.03));
  color: var(--bs-body-color);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.chat-opcion:hover { border-color: var(--bs-primary); transform: translateX(2px); }
.chat-opcion .flecha { margin-left: auto; opacity: .5; flex-shrink: 0; }
.chat-opcion i:first-child { color: var(--bs-primary); flex-shrink: 0; }

.chat-volver {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  color: var(--bs-secondary-color);
  font-size: 0.8rem;
  padding: 0 0 14px;
  cursor: pointer;
}
.chat-volver:hover { color: var(--bs-primary); }

.chat-pregunta {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--bs-body-color);
  margin: 0 0 12px;
}
.chat-respuesta {
  color: var(--bs-body-color);
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}

@media (max-width: 480px) {
  #chat-panel { left: 10px; right: 10px; width: auto; bottom: 82px; }
  #chat-boton { left: 12px; bottom: 12px; }
}
