/* Human Bot IA V99 - fondo global de chats al 80% y limpieza del menú de opciones. */
/* Fondo común a todas las conversaciones: foto aportada por el usuario suavizada,
   con una veladura del 80% y un difuminado más intenso para resaltar los mensajes. */
#conversation #messages.chatwall,
#conversation.hb95-chat-style #messages.chatwall,
html.hb97-light #conversation #messages.chatwall,
html.hb97-light #conversation:not(.hb95-chat-style) #messages.chatwall{
 background-color:#080c10!important;
 background-image:linear-gradient(rgba(8,12,16,.80),rgba(8,12,16,.80)),url('hb-v99-wallpaper.webp')!important;
 background-size:cover!important;
 background-position:center center!important;
 background-repeat:no-repeat!important;
 color:#f2f4f6!important;
}
/* Mantener las burbujas independientes y los temas individuales; en modo claro
   subimos su opacidad para que siempre se lean sobre el papel oscuro. */
html.hb97-light #conversation:not(.hb95-chat-style) #messages.chatwall .msg:not(.out){background:#e6edf2!important;color:#14232b!important}
#conversation #messages.chatwall .encryption,
#conversation #messages.chatwall .datepill{background:rgba(22,31,39,.96)!important;color:#e5e9eb!important}
/* La ventana de resultados nunca puede crecer más que la pantalla ni dejar
   su contenido expandirse al ancho de nombres/rutas/textos largos. */
#hb16-modal.hb98-search-open{padding:max(10px,env(safe-area-inset-top,0px)) max(10px,env(safe-area-inset-right,0px)) max(10px,env(safe-area-inset-bottom,0px)) max(10px,env(safe-area-inset-left,0px));overflow:hidden;box-sizing:border-box}
#hb16-modal.hb98-search-open .hb16-card{
 display:flex!important;flex-direction:column!important;
 width:min(100%,620px)!important;max-width:calc(100vw - 20px)!important;
 height:min(88dvh,780px);max-height:calc(100dvh - 20px)!important;
 min-width:0!important;min-height:0!important;
 overflow:hidden!important;box-sizing:border-box!important;padding:16px!important;
 border-radius:20px!important;
}
#hb16-modal.hb98-search-open #hb16-title{font-size:clamp(18px,4.5vw,22px);line-height:1.25;min-width:0;overflow-wrap:anywhere;flex:none;margin:0 0 14px}
#hb16-modal.hb98-search-open #hb16-body{display:flex!important;flex:1 1 auto;min-height:0;min-width:0;overflow:hidden;gap:0}
#hb16-modal.hb98-search-open #hb16-close{flex:none;align-self:flex-start;margin:13px 0 0!important}
.hb98-search{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;gap:10px;width:100%;max-width:100%}
.hb98-search-label{font-size:13px;font-weight:600;color:#e9edf0;margin:0!important}
.hb98-search-field{display:flex;align-items:center;min-width:0;gap:8px;background:#202a31;border:1px solid #44525b;border-radius:12px;padding:0 12px;flex:none}
.hb98-search-field>span{font-size:24px;opacity:.75;flex:none}
#hb16-body .hb98-search-field input{background:transparent!important;border:0!important;outline:0!important;min-width:0;max-width:100%;width:100%;padding:11px 2px!important;margin:0!important;font-size:16px!important;color:#fff!important;box-shadow:none!important;text-overflow:ellipsis}
#hb98-search-count{flex:none;font-size:12px;color:#b9c4cb;min-width:0;overflow-wrap:anywhere}
#hb98-search-results{min-width:0;min-height:0;flex:1;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;display:flex;flex-direction:column;gap:9px;padding:2px 3px 10px 0;scrollbar-width:thin}
.hb98-search-hit{display:flex;align-items:center;gap:10px;width:100%;min-width:0;max-width:100%;box-sizing:border-box;text-align:left;border:1px solid #34424b;border-radius:14px;background:#1a262e;color:#f2f5f7;padding:12px;cursor:pointer;flex:none}
.hb98-search-hit:active{background:#2b3941}.hb98-search-hit:focus-visible{outline:2px solid #ff7ab6;outline-offset:2px}
.hb98-search-icon{flex:none;display:grid;place-items:center;width:38px;height:38px;background:#32404a;border-radius:11px;color:#e4f0f9;font-size:19px}
.hb98-search-content{flex:1 1 auto;min-width:0;max-width:100%;display:flex;flex-direction:column;gap:5px}
.hb98-search-text{font-size:14px;line-height:1.45;font-weight:550;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden;overflow-wrap:anywhere;word-break:break-word;white-space:pre-wrap;max-width:100%}
.hb98-search-date{font-size:12px;color:#becbd2;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.hb98-search-arrow{flex:none;align-self:center;font-size:24px;color:#bac8d0}
.hb98-search-empty{font-size:14px;line-height:1.6;text-align:center;border:1px dashed #43505a;border-radius:14px;padding:25px 12px;overflow-wrap:anywhere;color:#cad3d9}
#messages .msg.hb98-found{outline:3px solid #f3ac52!important;outline-offset:2px;transition:outline-color .3s ease}
@media(max-width:600px){
 #hb16-modal.hb98-search-open{align-items:flex-end!important;padding:0!important}
 #hb16-modal.hb98-search-open .hb16-card{width:100%!important;max-width:100%!important;height:min(92dvh,900px)!important;max-height:calc(100dvh - 8px)!important;border-radius:22px 22px 0 0!important;padding:18px 14px calc(12px + env(safe-area-inset-bottom,0px))!important}
 .hb98-search-hit{padding:11px 9px;gap:8px}.hb98-search-icon{width:34px;height:34px}.hb98-search-text{font-size:13px}
}
@media(orientation:landscape) and (max-height:540px){#hb16-modal.hb98-search-open .hb16-card{height:96dvh!important;max-height:96dvh!important;padding-top:10px!important;padding-bottom:8px!important}#hb16-modal.hb98-search-open #hb16-title{margin-bottom:7px}#hb16-modal.hb98-search-open #hb16-close{margin-top:5px!important}}
@media(prefers-reduced-motion:reduce){#messages .msg.hb98-found{scroll-behavior:auto}}
