.hefesto-global { position:fixed; z-index:1200; right:max(16px,env(safe-area-inset-right)); bottom:max(14px,env(safe-area-inset-bottom)); color:#123049; font:500 .92rem/1.45 system-ui,sans-serif; }
.hefesto-global [hidden],.floating-whatsapp[hidden],#whatsapp-flutuante[hidden] { display:none!important; }
.hefesto-global button,.hefesto-global input { font:inherit; }
.hefesto-global button { cursor:pointer; }
.hf-global-trigger { display:flex; gap:8px; align-items:center; background:#fff; color:#123049; border:2px solid #244d75; border-radius:40px; padding:5px 16px 5px 8px; font-weight:750; box-shadow:0 6px 28px #12294333; }
#hf-global-panel { position:absolute; right:0; bottom:62px; width:min(410px,calc(100vw - 32px)); height:min(598px,calc(100dvh - 92px)); display:grid; grid-template-rows:auto minmax(65px,1fr) auto auto auto auto; background:#fff; color:#123049; box-shadow:0 14px 55px #0e263e55; border:1px solid #c7d9e8; border-radius:22px; overflow:hidden; }
#hf-global-panel > header { display:flex; align-items:center; gap:9px; padding:12px; background:#102c49; color:white; }
#hf-global-panel > header div { flex:1; }
#hf-global-panel small { display:block; color:#d8e9fa; }
#hf-global-panel > header button { border:1px solid #96b2ce; border-radius:9px; color:white; background:transparent; min-width:37px; min-height:38px; }
.hf-global-log { overflow:auto; padding:10px 14px; overscroll-behavior:contain; background:#f2f7fb; }
.hf-global-log p { width:fit-content; max-width:96%; padding:9px 11px; margin:0 0 7px; border-radius:13px; overflow-wrap:anywhere; }
.hf-global-assistant { background:white; border:1px solid #d8e6f1; }
.hf-global-visitor { margin-left:auto!important; background:#dbeaf8; }
.hf-global-options { display:flex; flex-wrap:wrap; gap:5px; padding:8px 12px 4px; overflow:auto; max-height:min(142px,22dvh); }
.hf-global-options a,.hf-global-options button,#hf-global-panel [data-explore] { font:inherit; font-size:.8rem; color:#1c486c; border:1px solid #c9dbea; border-radius:10px; background:#fff; padding:6px 8px; min-height:32px; text-decoration:none; }
#hf-global-panel [data-explore] { margin:4px 12px; justify-self:start; }
#hf-global-panel form { display:flex; gap:6px; padding:4px 12px; }
#hf-global-panel form input { width:100%; min-width:0; border:1px solid #9fb6cb; border-radius:8px; padding:8px; color:#122f49; }
#hf-global-panel form button { border:0; border-radius:8px; color:white; background:#234c76; min-width:44px; }
#hf-global-panel [data-human] { margin:5px 12px 11px; color:#123d64; text-decoration:underline; font-size:.83rem; }
.hefesto-global :focus-visible { outline:3px solid #df781a; outline-offset:2px; }
.hf-global-sr { position:absolute; clip-path:inset(50%); width:1px; height:1px; overflow:hidden; }
@media(max-height:500px) { #hf-global-panel { bottom:0; height:min(98dvh,475px); } }
.hf-global-controls { display:flex; gap:6px; flex-wrap:wrap; padding:4px 12px; }
#hf-global-panel .hf-global-controls button { margin:0; font:inherit; font-size:.8rem; color:#1c486c; border:1px solid #c9dbea; border-radius:10px; background:#fff; padding:6px 8px; min-height:32px; }
.hf27-handoff {
  box-sizing: border-box;
  width: min(550px, calc(100% - 28px));
  max-height: 82dvh;
  border: 1px solid #c8d7e4;
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  color: #142f49;
  box-shadow: 0 12px 40px #0c2a5150;
  overflow: auto;
}
.hf27-handoff::backdrop { background: #0a254c80; }
.hf27-handoff h2 { margin: 0 0 10px; font: 750 1.2rem/1.3 system-ui, sans-serif; }
.hf27-handoff pre {
  max-height: 40vh;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  padding: 12px;
  border-radius: 8px;
  background: #f0f5fa;
}
.hf27-handoff fieldset { margin: 10px 0; max-height: 24vh; overflow: auto; }
.hf27-handoff label { display: flex; align-items: start; gap: 7px; margin: 6px 0; }
.hf27-handoff [data-links] { display: flex; flex-wrap: wrap; gap: 8px; }
.hf27-handoff [data-links] > * {
  font: 700 .875rem/1.3 system-ui, sans-serif;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #244a70;
  border-radius: 8px;
  background: white;
  color: #244a70;
}

.hefesto-global {
    --hf-visual-height:100vh;
    --hf-keyboard:0px;
    bottom:calc(max(14px,env(safe-area-inset-bottom)) + var(--hf-keyboard));
    box-sizing:border-box;
}
.hefesto-global *, .hefesto-global *::before, .hefesto-global *::after { box-sizing:border-box; }
#hf-global-panel {
    bottom:0;
    grid-template-rows:auto minmax(36px,1fr) auto auto auto auto;
    height:min(598px,calc(var(--hf-visual-height) - 92px));
    min-height:0;
    text-align:start;
    overscroll-behavior:contain;
}
#hf-global-panel > header { padding:7px 10px; min-height:56px; gap:7px; }
#hf-global-panel > header div { min-width:0; }
#hf-global-panel > header img { flex:none; width:38px; height:38px; object-fit:contain; }
#hf-global-panel > header button { flex:none; min-width:44px; min-height:44px; padding:.1rem; }
.hf-global-log { min-height:0; padding:8px 12px; }
.hf-global-options:empty { display:none; }
.hf-global-options { gap:4px; padding:5px 9px 3px; max-height:min(118px,23vh); }
.hf-global-options a, .hf-global-options button { min-height:36px; padding:5px 7px; cursor:pointer; }
#hf-global-panel .hf-global-controls button { min-height:38px; }
#hf-global-panel form { margin:0; padding:3px 9px; }
#hf-global-panel form input { font-size:max(16px,1em); }
#hf-global-panel form button,#hf-global-panel [data-human] { min-height:44px; }
#hf-global-panel [data-human] { margin:0 12px; display:flex; align-items:center; }
.hf-global-controls { padding:3px 9px; }
.hefesto-global[data-compact="true"] #hf-global-panel {
    height:min(598px,calc(var(--hf-visual-height) - max(28px,env(safe-area-inset-top))));
    grid-template-rows:auto minmax(30px,1fr) auto auto auto auto;
}
.hefesto-global[data-compact="true"] .hf-global-options { max-height:43px; }
.hefesto-global[data-compact="true"] #hf-global-panel [data-human] { min-height:36px; }
@media(max-width:420px) {
    #hf-global-panel > header { gap:4px; padding-inline:7px; }
    #hf-global-panel > header small { line-height:1.12; }
    #hf-global-panel .hf-global-controls button { min-height:42px; }
    .hf-global-options a, .hf-global-options button { min-height:40px; }
}
