/* ===== WIDGET "TEIDE" - ASISTENTE VIRTUAL HC MANAGEMENT ===== */

#teideBubble{
  position: fixed;
  bottom: 92px;
  right: 22px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy, #071a2f), var(--navy2, #0a2440));
  border: 2px solid var(--gold, #d4af37);
  box-shadow: 0 10px 30px rgba(7,26,47,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  font-size: 28px;
  transition: transform .15s ease;
}
#teideBubble:hover{ transform: scale(1.06); }
#teideBubble .teideDot{
  position:absolute;
  top:-2px; right:-2px;
  width:14px; height:14px;
  border-radius:50%;
  background:#3ddc84;
  border:2px solid #fff;
}
#teideLabel{
  position: fixed;
  bottom: 108px;
  right: 92px;
  background: #fff;
  color: var(--navy, #071a2f);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(7,26,47,.18);
  white-space: nowrap;
  z-index: 9999;
  cursor: pointer;
}
#teideLabel::after{
  content:"";
  position:absolute;
  right:-6px;
  top:50%;
  transform:translateY(-50%);
  border-width:6px 0 6px 6px;
  border-style:solid;
  border-color:transparent transparent transparent #fff;
}

#teidePanel{
  position: fixed;
  bottom: 166px;
  right: 22px;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 460px;
  max-height: calc(100vh - 140px);
  background: #0d1b2e;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
#teidePanel.open{ display: flex; }

#teideHeader{
  background: linear-gradient(135deg, var(--navy, #071a2f), var(--navy2, #0a2440));
  border-bottom: 1px solid rgba(212,175,55,.35);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  flex-shrink: 0;
}
#teideHeader .teideAvatar{
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(212,175,55,.18);
  border: 1px solid rgba(212,175,55,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
#teideHeader .teideInfo{ flex: 1; line-height: 1.3; }
#teideHeader .teideName{ font-weight: 700; font-size: 14.5px; }
#teideHeader .teideStatus{ font-size: 11.5px; color: var(--gold, #d4af37); }
#teideHeader .teideStatus::before{
  content:"●"; color:#3ddc84; margin-right:4px; font-size:9px;
}
#teideClose{
  background: none; border: none; color: #fff; opacity:.7;
  font-size: 18px; cursor: pointer; line-height:1; padding:4px;
}
#teideClose:hover{ opacity:1; }

#teideMessages{
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 6px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #0d1b2e;
}
.teideMsg{
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
}
.teideMsg.bot{
  background: #17263c;
  color: #e8edf3;
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.teideMsg.user{
  background: var(--gold, #d4af37);
  color: #1a1405;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
  font-weight: 600;
}
.teideMsg.typing{
  background: #17263c;
  color: #9fb0c0;
  align-self: flex-start;
  font-style: italic;
  font-size: 12.5px;
}

#teideQuick{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px 14px;
  background: #0d1b2e;
  flex-shrink: 0;
}
.teideQuickBtn{
  background: rgba(212,175,55,.12);
  border: 1px solid rgba(212,175,55,.4);
  color: var(--gold, #d4af37);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.teideQuickBtn:hover{ background: rgba(212,175,55,.22); }

#teideInputRow{
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #0a1525;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
#teideInput{
  flex: 1;
  background: #17263c;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
}
#teideInput::placeholder{ color: #7f8fa3; }
#teideSend{
  background: var(--gold, #d4af37);
  border: none;
  border-radius: 10px;
  width: 40px;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 16px;
  color: #1a1405;
}

@media (max-width: 480px){
  #teidePanel{
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 158px;
  }
  #teideBubble{ right: 16px; bottom: 86px; }
  #teideLabel{ right: 84px; bottom: 100px; font-size: 12px; padding: 8px 12px; }
}
