/*
 * Cuadro de conversación de la Homepage (bloque "El talento correcto…"), que anima assets/homepage/js/homepage.js.
 * Valores de la versión aprobada (ht-enhancements y los parches ht-v9, ht-v10, ht-v14 y ht-v23 del cliente, ya
 * resueltos en uno). Va aparte de homepage.css porque es un componente con su propio script; se carga con ella.
 */

.ht-chat {
  display: flex;
  flex-direction: column;
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(102,204,153,.38);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(5,13,29,.54));
  box-shadow: 0 28px 80px rgba(2,10,26,.28);
  backdrop-filter: blur(12px);
}
.ht-chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.ht-chat__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ht-chat__online { width: 8px; height: 8px; border-radius: 50%; background: var(--ht-green); box-shadow: 0 0 0 3px rgba(102,204,153,.18); }
.ht-chat__tag {
  margin-left: auto;
  color: rgba(255,255,255,.55);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: right;
}
.ht-chat__pause {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 26px; height: 26px;
  margin-left: -4px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.ht-chat__pause i { display: block; width: 2.5px; height: 9px; border-radius: 2px; background: rgba(255,255,255,.55); transition: background-color .2s ease; }
.ht-chat__pause:hover,
.ht-chat.is-paused .ht-chat__pause { border-color: rgba(102,204,153,.7); background: rgba(102,204,153,.12); }
.ht-chat__pause:hover i,
.ht-chat.is-paused .ht-chat__pause i { background: var(--ht-green); }
.ht-chat__body { display: grid; gap: 12px; padding: 16px 20px 14px; }
.ht-chat__q-zone { display: flex; flex-direction: column; align-items: flex-end; min-height: 92px; }
.ht-chat__a-zone { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 150px; }
.ht-chat__label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 7px !important;
  color: rgba(255,255,255,.6);
  font-size: 10.5px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.ht-chat__avatar {
  display: inline-grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--ht-green);
  color: var(--ht-navy-deep);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .02em;
}
.ht-chat__bubble { position: relative; padding: 10px 14px; }
.ht-chat__bubble--q { max-width: 78%; border: 1px solid rgba(255,255,255,.15); border-radius: 16px 16px 4px 16px; background: rgba(255,255,255,.07); }
.ht-chat__bubble--q.is-empty { min-width: 40px; min-height: 42px; }
.ht-chat__bubble--q p { color: #fff; font-size: 15px; line-height: 21px; font-weight: 500; }
.ht-chat__bubble--a {
  visibility: hidden;
  max-width: 85%;
  opacity: 0;
  border: 1px solid rgba(102,204,153,.38);
  border-radius: 16px 16px 16px 4px;
  background: rgba(102,204,153,.11);
}
.ht-chat__bubble--a p { color: #C9F1DD; font-size: 17px; line-height: 24px; font-weight: 500; }
.ht-chat__dots {
  position: absolute;
  top: 21px; left: 0;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 11px 13px;
  border: 1px solid rgba(102,204,153,.38);
  border-radius: 18px 18px 18px 4px;
  background: rgba(102,204,153,.11);
}
.ht-chat__dots.is-on { display: inline-flex; }
.ht-chat__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ht-green); opacity: .35; animation: ht-chat-punto 1.1s ease-in-out infinite; }
.ht-chat__dots i:nth-child(2) { animation-delay: .18s; }
.ht-chat__dots i:nth-child(3) { animation-delay: .36s; }
@keyframes ht-chat-punto { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ht-chat__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 20px 13px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.ht-chat__bars { display: flex; flex: 1; gap: 6px; min-width: 0; }
/* 24 px de alto para el toque (la línea visible sigue siendo de 4) */
.ht-chat__bar { flex: 1; max-width: 30px; height: 24px; padding: 10px 0; border: 0; background: transparent; cursor: pointer; }
.ht-chat__bar::before { content: ""; display: block; height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); }
.ht-chat__bar span { display: block; height: 4px; margin-top: -4px; border-radius: 4px; background: var(--ht-green); transform: scaleX(0); transform-origin: left center; }
.ht-chat__bar:focus-visible { outline: 2px solid var(--ht-green); outline-offset: 3px; }
.ht-chat__bar:focus:not(:focus-visible) { outline: none; } /* al hacer clic, sin el recuadro de Bootstrap */
.ht-chat__cta {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
}
.ht-chat__cta i {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ht-green);
  color: var(--ht-navy-deep);
  font-style: normal;
  font-size: 15px;
  transition: transform .2s ease;
}
.ht-chat__cta:is(:hover, :focus-visible) i { transform: translateX(3px); }
.ht-chat__cta:hover span { color: var(--ht-green); }

@media (max-width: 767px) {
  .ht-chat__head { padding: 12px 16px; }
  .ht-chat__tag { font-size: 12px; }
  .ht-chat__pause { width: 30px; height: 30px; }
  .ht-chat__body { padding: 14px 16px 12px; }
  .ht-chat__q-zone { min-height: 110px; }
  .ht-chat__a-zone { min-height: 192px; }
  .ht-chat__label { font-size: 12px; }
  .ht-chat__avatar { font-size: 10px; }
  .ht-chat__bubble--q { max-width: 88%; }
  .ht-chat__bubble--a { max-width: 94%; }
  .ht-chat__bubble--a p { font-size: 16px; line-height: 23px; }
  .ht-chat__foot { flex-direction: column; align-items: stretch; gap: 8px; padding: 11px 16px 13px; }
  .ht-chat__bars { width: 100%; }
  .ht-chat__bar { max-width: none; }
  .ht-chat__cta { justify-content: space-between; }
  .ht-chat__cta span { font-size: 14px; }
  .ht-chat__cta i { width: 44px; height: 44px; }
}
@media (max-width: 480px) {
  .ht-chat__tag { display: none; }
  .ht-chat__pause { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .ht-chat__cta i { transition: none; }
  .ht-chat__dots i { animation: none; opacity: .8; }
}
