/* CIEM identity manual: institutional navy, green accents, action blue. */
/* WOFF2 primero (32 KB); TTF solo como respaldo de navegadores antiguos. */
@font-face{font-family:"CIEM DejaVu";src:url("./fonts/DejaVuSans.woff2") format("woff2"),url("./fonts/DejaVuSans.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"CIEM DejaVu";src:url("./fonts/DejaVuSans-Bold.woff2") format("woff2"),url("./fonts/DejaVuSans-Bold.ttf") format("truetype");font-weight:600 800;font-style:normal;font-display:swap}
#ciem-chat{position:fixed;bottom:24px;right:24px;z-index:1040;font:18px/1.6 "CIEM DejaVu","DejaVu Sans",sans-serif;color:#101F65}
#ciem-chat *{box-sizing:border-box}
#ciem-chat button{cursor:pointer;font:inherit}
#ciem-chat .cc-toggle{border:0;border-radius:10px;padding:17px 28px;background:#087DFA;color:#101F65;box-shadow:0 6px 24px #101f6526;font-weight:600;font-size:18px}
#ciem-chat section{padding:0;margin:0;position:absolute;bottom:82px;right:0;width:900px;max-width:calc(100vw - 48px);height:min(640px,calc(100vh - 130px));height:min(640px,calc(100dvh - 130px));background:white;border:1px solid #d8e1ee;border-radius:14px;box-shadow:0 12px 48px #101f6526;overflow:hidden;display:flex;flex-direction:column}
#ciem-chat [hidden]{display:none!important}
#ciem-chat header{position:static;width:auto;height:auto;min-height:0;margin:0;background:#101F65;color:white;border-bottom:3px solid #06D69A;padding:12px 22px;display:flex;justify-content:space-between;align-items:center;flex-shrink:0}
#ciem-chat header strong{font-size:24px;line-height:1.3}
#ciem-chat header small{display:block;font-size:15px;opacity:.9;margin-top:3px}
#ciem-chat .cc-close{background:transparent;color:white;border:0;font-size:34px;min-width:44px;min-height:44px;padding:0 8px}
#ciem-chat .cc-messages{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:14px 18px;scroll-padding-top:10px;background:#f6f9fc}
#ciem-chat .cc-message{padding:14px 16px;border-radius:10px;margin-bottom:12px;max-width:88%;white-space:pre-wrap;overflow-wrap:anywhere;font-size:17px;line-height:1.55}
#ciem-chat .cc-assistant{background:#edf4fa}
#ciem-chat .cc-user{background:#101F65;color:white;margin-left:auto}
#ciem-chat form{margin:0;padding:10px 18px;border-top:1px solid #eee;flex-shrink:0}
#ciem-chat label{display:block;font-size:14px;font-weight:600;margin-bottom:6px}
#ciem-chat .cc-compose{display:flex;gap:12px}
#ciem-chat textarea{height:56px;min-height:56px;max-height:56px;margin:0;flex:1;min-width:0;resize:none;border:1px solid #c5d3e4;border-radius:12px;padding:10px 12px;font:inherit;font-size:17px;line-height:1.5}
#ciem-chat form button{border:0;border-radius:12px;background:#087DFA;color:#101F65;width:64px;flex-shrink:0;font-size:26px}
#ciem-chat button:disabled{opacity:.5;cursor:wait}
#ciem-chat form small{display:block;font-size:12px;color:#52627a;margin-top:6px;line-height:1.4}
#ciem-chat :focus-visible{outline:3px solid #06D69A;outline-offset:2px}
@media(max-width:640px){
#ciem-chat{bottom:12px;right:12px}
#ciem-chat .cc-toggle{padding:13px 21px;font-size:17px}
#ciem-chat section{width:calc(100vw - 24px);max-width:calc(100vw - 24px);height:min(640px,calc(100dvh - 96px));bottom:70px;border-radius:12px}
#ciem-chat header{padding:14px 16px}
#ciem-chat header strong{font-size:21px}
#ciem-chat header small{font-size:13px}
#ciem-chat .cc-messages{padding:12px 14px}
#ciem-chat .cc-message{font-size:17px;padding:12px 14px;max-width:95%}
#ciem-chat form{padding:12px 16px}
#ciem-chat textarea{height:48px;min-height:48px;max-height:48px;font-size:17px;padding:10px 12px}
#ciem-chat form button{width:50px}
#ciem-chat form small{font-size:12px}
}
@media(max-height:540px){
#ciem-chat section{height:calc(100dvh - 100px);max-height:calc(100dvh - 100px);bottom:68px}
#ciem-chat header{padding:8px 16px}
#ciem-chat header small{display:none}
#ciem-chat .cc-messages{padding:12px 16px}
#ciem-chat form{padding:8px 16px}
#ciem-chat textarea{height:48px;min-height:48px;max-height:48px}
#ciem-chat form small{margin-top:5px}
}

#ciem-chat .cc-message a{color:#101F65;text-decoration:underline;text-underline-offset:3px;font-weight:600;overflow-wrap:anywhere}
#ciem-chat .cc-user a{color:white}
#ciem-chat .cc-message a:hover{opacity:.8}

#ciem-chat .cc-message a.cc-whatsapp{display:flex;align-items:center;justify-content:center;gap:10px;width:fit-content;max-width:100%;margin-top:14px;padding:12px 18px;border-radius:12px;background:#25d366;color:#083b20;font-size:17px;font-weight:700;line-height:1.4;text-decoration:none;white-space:normal;box-shadow:0 3px 10px #075e5420;transition:background .15s}
#ciem-chat .cc-message a.cc-whatsapp:hover{background:#20c45e;color:#083b20;opacity:1}
#ciem-chat .cc-whatsapp .fa-whatsapp{font-size:28px;flex-shrink:0}
@media(max-width:640px){#ciem-chat .cc-message a.cc-whatsapp{font-size:16px;padding:11px 14px}}

#ciem-chat header small{color:#06D69A;opacity:1}
#ciem-chat .cc-assistant{border-left:3px solid #06D69A}
#ciem-chat .cc-toggle:hover,#ciem-chat form button:hover{background:#06D69A;color:#101F65}
#ciem-chat .cc-toggle,#ciem-chat form button{transition:background .15s,color .15s}

#ciem-chat .cc-toggle{display:inline-flex;align-items:center;gap:10px}

#ciem-chat .cc-toggle,#ciem-chat .cc-toggle:hover{color:#FFF;}
#ciem-chat .cc-whatsapp-launcher{display:none}
@media(max-width:640px){
#ciem-chat .cc-toggle{width:56px;height:56px;padding:0;justify-content:center;border-radius:50%;background:transparent;box-shadow:none}
#ciem-chat .cc-toggle>svg,#ciem-chat .cc-toggle>span{display:none}
#ciem-chat .cc-whatsapp-launcher{display:block;width:56px;height:56px}
#ciem-chat .cc-toggle:hover{background:transparent;color:#FFF}
}
#ciem-chat .cc-inline-wa{display:inline-block;width:1.15em;height:1.15em;margin-right:3px;vertical-align:-0.22em;border-radius:50%}
