/* Asistente Inteligente IETAB — estilos con alcance #ietab-cb-root (no afectan al tema). */
#ietab-cb-root { position: fixed; z-index: 99990; bottom: calc(var(--ietab-cb-bottom, 20px) + env(safe-area-inset-bottom, 0px)); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #1c2a1f; }
#ietab-cb-root.ietab-cb-pos-left { left: calc(16px + env(safe-area-inset-left, 0px)); }
#ietab-cb-root.ietab-cb-pos-right { right: calc(16px + env(safe-area-inset-right, 0px)); }
#ietab-cb-root *, #ietab-cb-root *::before, #ietab-cb-root *::after { box-sizing: border-box; }
#ietab-cb-root [hidden] { display: none !important; }
#ietab-cb-root button, #ietab-cb-root textarea, #ietab-cb-root input { font: inherit; }
#ietab-cb-root .ietab-cb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#ietab-cb-root .ietab-cb-launcher { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--ietab-cb-primary, #1f6b3a); color: var(--ietab-cb-on-primary, #fff); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); cursor: pointer; padding: 0; margin: 0; border-bottom: 4px solid var(--ietab-cb-accent, #c9a227); }
#ietab-cb-root .ietab-cb-launcher:hover { filter: brightness(1.08); }
#ietab-cb-root button:focus-visible, #ietab-cb-root textarea:focus-visible, #ietab-cb-root a:focus-visible, #ietab-cb-root .ietab-cb-log:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; box-shadow: 0 0 0 5px rgba(0, 0, 0, .55); }

#ietab-cb-root .ietab-cb-panel { position: absolute; bottom: 68px; width: 380px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); display: flex; flex-direction: column; background: #fff; border: 1px solid #cbd5cc; border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, .28); overflow: hidden; }
#ietab-cb-root.ietab-cb-pos-left .ietab-cb-panel { left: 0; }
#ietab-cb-root.ietab-cb-pos-right .ietab-cb-panel { right: 0; }
#ietab-cb-root .ietab-cb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--ietab-cb-primary, #1f6b3a); color: var(--ietab-cb-on-primary, #fff); border-bottom: 4px solid var(--ietab-cb-accent, #c9a227); }
#ietab-cb-root .ietab-cb-title { margin: 0; padding: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; color: inherit; border: 0; }
#ietab-cb-root .ietab-cb-actions { display: flex; gap: 4px; }
#ietab-cb-root .ietab-cb-iconbtn { width: 36px; height: 36px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .18); color: inherit; cursor: pointer; font-size: 1.05rem; line-height: 1; padding: 0; }
#ietab-cb-root .ietab-cb-iconbtn:hover { background: rgba(255, 255, 255, .32); }

#ietab-cb-root .ietab-cb-log { flex: 1 1 auto; overflow-y: auto; padding: 12px; background: #f5f8f5; overscroll-behavior: contain; }
#ietab-cb-root .ietab-cb-msg { max-width: 92%; margin: 0 0 10px; padding: 8px 12px; border-radius: 14px; overflow-wrap: anywhere; word-break: break-word; }
#ietab-cb-root .ietab-cb-msg p { margin: 0 0 6px; padding: 0; }
#ietab-cb-root .ietab-cb-msg p:last-child { margin-bottom: 0; }
#ietab-cb-root .ietab-cb-msg ul { margin: 4px 0 4px 18px; padding: 0; }
#ietab-cb-root .ietab-cb-bot { background: #fff; border: 1px solid #d6e0d7; margin-right: auto; border-bottom-left-radius: 4px; }
#ietab-cb-root .ietab-cb-user { background: var(--ietab-cb-primary, #1f6b3a); color: var(--ietab-cb-on-primary, #fff); margin-left: auto; border-bottom-right-radius: 4px; }
#ietab-cb-root .ietab-cb-msg a { color: #0b4f91; text-decoration: underline; overflow-wrap: anywhere; }
#ietab-cb-root .ietab-cb-user a { color: inherit; }
#ietab-cb-root .ietab-cb-sources { margin-top: 8px; padding-top: 6px; border-top: 1px dashed #b8c6ba; font-size: .85rem; }
#ietab-cb-root .ietab-cb-sources ul { margin: 2px 0 0 18px; }

#ietab-cb-root .ietab-cb-status { min-height: 1.4em; margin: 0; padding: 0 12px; font-size: .85rem; color: #3b4a3e; background: #f5f8f5; }
#ietab-cb-root .ietab-cb-form { display: flex; gap: 8px; align-items: flex-end; padding: 8px 12px; border-top: 1px solid #d6e0d7; background: #fff; position: relative; }
#ietab-cb-root .ietab-cb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#ietab-cb-root .ietab-cb-input { flex: 1 1 auto; min-height: 44px; max-height: 110px; resize: none; padding: 10px 12px; border: 2px solid #7d8f80; border-radius: 12px; background: #fff; color: #1c2a1f; }
#ietab-cb-root .ietab-cb-send { flex: 0 0 auto; min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--ietab-cb-primary, #1f6b3a); color: var(--ietab-cb-on-primary, #fff); font-weight: 700; cursor: pointer; }
#ietab-cb-root .ietab-cb-send:disabled, #ietab-cb-root .ietab-cb-input:disabled { opacity: .6; cursor: not-allowed; }
#ietab-cb-root .ietab-cb-notice { margin: 0; padding: 6px 12px 10px; font-size: .75rem; line-height: 1.35; color: #44554a; background: #fff; }

@media (max-width: 600px) {
	#ietab-cb-root .ietab-cb-panel { position: fixed; left: 8px; right: 8px; bottom: calc(76px + var(--ietab-cb-bottom, 20px) + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; height: min(72vh, 560px); max-height: calc(100dvh - 110px); }
	#ietab-cb-root .ietab-cb-msg { max-width: 96%; }
}
@media (prefers-reduced-motion: no-preference) { #ietab-cb-root .ietab-cb-launcher { transition: filter .15s; } }
