:root{
  --hse-assistant-yellow:#f5b400;
  --hse-assistant-orange:#ff7a00;
  --hse-assistant-dark:#111827;
  --hse-assistant-panel:#ffffff;
  --hse-assistant-muted:#5f6673;
  --hse-assistant-line:#e5e7eb;
}

/* Respaldo de accesibilidad para páginas públicas que no cargan public.css,
   como el catálogo dinámico. public.css contiene la misma técnica. */
.hse-seo-skip-link{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
  border:0!important;
}

.hse-seo-skip-link:focus-visible{
  position:fixed!important;
  top:12px!important;
  left:12px!important;
  width:auto!important;
  height:auto!important;
  padding:12px 16px!important;
  margin:0!important;
  overflow:visible!important;
  clip:auto!important;
  clip-path:none!important;
  white-space:normal!important;
  z-index:100000!important;
  border-radius:10px!important;
  background:#111827!important;
  color:#fff!important;
  box-shadow:0 10px 30px rgba(0,0,0,.30)!important;
}

.hse-assistant-launcher{
  position:fixed;
  right:22px;
  bottom:108px;
  z-index:1180;
  min-height:54px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:7px 16px 7px 8px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:999px;
  background:#111827;
  color:#fff;
  box-shadow:0 14px 34px rgba(0,0,0,.24);
  font:800 14px/1 "Inter",system-ui,sans-serif;
  cursor:pointer;
}

.hse-assistant-launcher img{
  width:40px;
  height:40px;
  flex:0 0 40px;
}

.hse-assistant-launcher:hover{background:#1f2937}
.hse-assistant-launcher:focus-visible,
.hse-assistant-panel button:focus-visible,
.hse-assistant-panel input:focus-visible,
.hse-assistant-panel a:focus-visible{
  outline:3px solid var(--hse-assistant-yellow);
  outline-offset:3px;
}

.hse-assistant-panel{
  position:fixed;
  right:22px;
  bottom:176px;
  z-index:1175;
  width:min(400px,calc(100vw - 32px));
  max-height:min(620px,calc(100dvh - 194px));
  display:none;
  grid-template-rows:auto minmax(120px,1fr) auto auto;
  overflow:hidden;
  border:1px solid rgba(17,24,39,.12);
  border-radius:24px;
  background:var(--hse-assistant-panel);
  color:#111827;
  box-shadow:0 24px 70px rgba(0,0,0,.28);
  font-family:"Inter",system-ui,sans-serif;
}

.hse-assistant-panel[data-open="true"]{display:grid}

.hse-assistant-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px 16px 14px;
  background:linear-gradient(135deg,#111827,#202938);
  color:#fff;
}

.hse-assistant-head strong{display:block;font-size:16px;line-height:1.2}
.hse-assistant-head span{display:block;margin-top:3px;color:#d1d5db;font-size:11px;line-height:1.35}
.hse-assistant-close{
  width:38px;
  height:38px;
  flex:0 0 38px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:12px;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}

.hse-assistant-messages{
  min-height:150px;
  overflow:auto;
  padding:16px;
  background:#f7f8fa;
  overscroll-behavior:contain;
}

.hse-assistant-message{
  max-width:92%;
  margin:0 0 10px;
  padding:11px 12px;
  border-radius:15px;
  font-size:13px;
  line-height:1.55;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.hse-assistant-message--assistant{
  background:#fff;
  border:1px solid var(--hse-assistant-line);
  color:#252b35;
}

.hse-assistant-message--user{
  margin-left:auto;
  background:#111827;
  color:#fff;
}

.hse-assistant-links{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:0 0 14px;
}

.hse-assistant-links a{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:7px 10px;
  border:1px solid #e0a000;
  border-radius:999px;
  background:#fff8df;
  color:#5f4300;
  font-size:11px;
  line-height:1.2;
  font-weight:800;
}

.hse-assistant-quick{
  display:flex;
  gap:7px;
  overflow-x:auto;
  padding:10px 12px;
  border-top:1px solid var(--hse-assistant-line);
  background:#fff;
  scrollbar-width:thin;
}

.hse-assistant-quick button{
  min-height:34px;
  flex:0 0 auto;
  padding:7px 10px;
  border:1px solid #d8dce3;
  border-radius:999px;
  background:#fff;
  color:#343a46;
  font-size:11px;
  font-weight:750;
  cursor:pointer;
}

.hse-assistant-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  padding:12px;
  border-top:1px solid var(--hse-assistant-line);
  background:#fff;
}

.hse-assistant-form label{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
  border:0;
}

.hse-assistant-form input{
  width:100%;
  min-width:0;
  height:42px;
  padding:0 12px;
  border:1px solid #cfd4dc;
  border-radius:12px;
  background:#fff;
  color:#111827;
  font:500 13px/1.2 "Inter",system-ui,sans-serif;
}

.hse-assistant-send{
  min-width:70px;
  height:42px;
  padding:0 12px;
  border:0;
  border-radius:12px;
  background:linear-gradient(135deg,var(--hse-assistant-yellow),var(--hse-assistant-orange));
  color:#111;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

.hse-assistant-footer{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:0 12px 12px;
  background:#fff;
}

.hse-assistant-footer a{
  color:#754b00;
  font-size:11px;
  font-weight:800;
  text-decoration:underline;
  text-underline-offset:2px;
}

@media (max-width:640px){
  .hse-assistant-launcher{
    right:16px;
    bottom:88px;
    width:56px;
    height:56px;
    min-height:56px;
    padding:8px;
    justify-content:center;
  }
  .hse-assistant-launcher span{display:none}
  .hse-assistant-panel{
    right:16px;
    bottom:156px;
    width:calc(100vw - 32px);
    max-height:calc(100dvh - 174px);
    border-radius:20px;
  }
  .hse-assistant-footer{flex-wrap:wrap}
}

@media (prefers-reduced-motion:reduce){
  .hse-assistant-launcher,
  .hse-assistant-panel,
  .hse-assistant-panel *{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
