/* Búho en la landing: el globito y el chat (Etapa 5, 25-sep-2026).
   Todo con prefijo .bc- para no pisar nada de la página. Los colores son los
   tokens de la landing (:root de _plantilla_index.html). */

.bc-boton {
  position: fixed; right: 20px; bottom: 20px; z-index: 900;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px 8px 8px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--navy, #1c2b45); color: #fff;
  font: 600 15px/1 var(--font-b, system-ui, sans-serif);
  box-shadow: 0 10px 30px rgba(28, 43, 69, .28);
  transition: transform .2s var(--E, ease), box-shadow .2s;
}
.bc-boton:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(28, 43, 69, .34); }
.bc-boton img { width: 40px; height: 40px; border-radius: 50%; display: block; }
.bc-boton[hidden] { display: none; }

.bc-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 901;
  width: 370px; height: min(580px, calc(100vh - 40px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--borde-3, #d5dde8); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(28, 43, 69, .30);
  font-family: var(--font-b, system-ui, sans-serif); color: var(--tinta, #1c2b45);
}
.bc-panel[hidden] { display: none; }

.bc-cabeza {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--navy, #1c2b45); color: #fff;
}
.bc-cabeza img { width: 38px; height: 38px; border-radius: 50%; }
.bc-cabeza__t { font: 600 16px/1.2 var(--font-t, Georgia, serif); }
.bc-cabeza__s { font-size: 12px; opacity: .8; }
.bc-cerrar {
  margin-left: auto; border: 0; background: none; color: #fff; cursor: pointer;
  font-size: 22px; line-height: 1; padding: 4px 6px; opacity: .8;
}
.bc-cerrar:hover { opacity: 1; }

.bc-charla {
  flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px;
  background: var(--fondo, #f4f6f9);
}
.bc-vacio { margin: auto 8px; text-align: center; font-size: 14px; color: var(--tinta-2, #55617a); }
.bc-vacio b { display: block; font: 600 17px/1.3 var(--font-t, Georgia, serif); color: var(--tinta, #1c2b45); margin-bottom: 6px; }

.bc-msg {
  max-width: 84%; padding: 9px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.bc-msg--visitante { align-self: flex-end; background: var(--azul, #2b4d8f); color: #fff; border-bottom-right-radius: 4px; }
.bc-msg--agente, .bc-msg--pablo { align-self: flex-start; background: #fff; border: 1px solid var(--borde-3, #d5dde8); border-bottom-left-radius: 4px; }
.bc-msg--pablo { border-color: var(--verde, #2e7d4f); }
.bc-msg__quien { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tinta-3, #64708a); margin-bottom: 2px; }
.bc-msg--pablo .bc-msg__quien { color: var(--verde, #2e7d4f); }
.bc-msg a { color: inherit; text-decoration: underline; }
.bc-msg--sistema { align-self: center; max-width: 92%; font-size: 12.5px; color: var(--tinta-3, #64708a); background: none; padding: 2px 8px; text-align: center; }

.bc-escribiendo { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--borde-3, #d5dde8); border-radius: 14px; }
.bc-escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: var(--tinta-4, #8a97ad); animation: bc-salto 1.2s infinite; }
.bc-escribiendo i:nth-child(2) { animation-delay: .15s; }
.bc-escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes bc-salto { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.bc-aviso { padding: 8px 14px; font-size: 13px; background: #fff7e6; color: #7a5210; border-top: 1px solid #ecd9ad; }
.bc-aviso[hidden] { display: none; }
.bc-aviso--error { background: #fdf0f0; color: #9b1c1c; border-top-color: #efc6c6; }

.bc-pie { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--borde-3, #d5dde8); background: #fff; }
.bc-pie textarea {
  flex: 1; resize: none; max-height: 110px; min-height: 42px; padding: 10px 12px;
  border: 1px solid var(--borde, #b9c4d6); border-radius: 12px;
  font: 14.5px/1.4 var(--font-b, system-ui, sans-serif); color: inherit;
}
.bc-pie textarea:focus { outline: 2px solid var(--azul, #2b4d8f); outline-offset: -1px; border-color: transparent; }
.bc-enviar {
  align-self: flex-end; height: 42px; padding: 0 16px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--navy, #1c2b45); color: #fff; font: 600 14px/1 var(--font-b, system-ui, sans-serif);
}
.bc-enviar:disabled { opacity: .5; cursor: default; }
.bc-nueva { align-self: center; margin-top: 4px; border: 1px solid var(--borde, #b9c4d6); background: #fff; border-radius: 999px; padding: 6px 14px; font: 600 13px/1 var(--font-b, system-ui, sans-serif); color: var(--tinta, #1c2b45); cursor: pointer; }
.bc-legal { padding: 0 12px 8px; font-size: 11px; color: var(--tinta-4, #8a97ad); background: #fff; }

@media (max-width: 520px) {
  .bc-panel { right: 0; bottom: 0; width: 100%; height: 100%; border-radius: 0; border: 0; }
  .bc-boton { right: 14px; bottom: 14px; }
}
