/* ============================================================
   SIOM Chatbot Widget — estilos
   Colores SIOM: azul marino #003B5C / celeste #00A9E0 / blanco
   ============================================================ */
#siom-chatbot-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #003B5C;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 59, 92, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: transform 0.2s, box-shadow 0.2s;
}
#siom-chatbot-launcher:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 59, 92, 0.55);
}
#siom-chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 999999;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
#siom-chatbot-window.open {
    display: flex;
}
#siom-chatbot-header {
    background: linear-gradient(135deg, #003B5C, #005a8a);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
#siom-chatbot-header .siom-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
#siom-chatbot-header .siom-title {
    flex: 1;
    line-height: 1.2;
}
#siom-chatbot-header .siom-title strong {
    font-size: 15px;
    display: block;
}
#siom-chatbot-header .siom-title span {
    font-size: 11px;
    opacity: 0.85;
}
#siom-chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.8;
}
#siom-chatbot-close:hover { opacity: 1; }
#siom-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #f4f7fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.siom-msg {
    max-width: 85%;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.45;
    word-wrap: break-word;
    white-space: pre-wrap;
}
.siom-msg a { color: #005a8a; font-weight: 600; }
.siom-msg.bot {
    background: #fff;
    color: #1a2b3c;
    border: 1px solid #e2e8f0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.siom-msg.user {
    background: #00A9E0;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.siom-msg.sys {
    background: #fff3cd;
    color: #664d03;
    align-self: center;
    font-size: 12px;
    text-align: center;
    max-width: 95%;
}
.siom-msg.typing {
    color: #8899aa;
    font-style: italic;
}
#siom-chatbot-inputbar {
    display: flex;
    padding: 10px 12px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    gap: 8px;
}
#siom-chatbot-input {
    flex: 1;
    border: 1px solid #d1d9e0;
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 13.5px;
    outline: none;
    font-family: inherit;
}
#siom-chatbot-input:focus { border-color: #00A9E0; }
#siom-chatbot-send {
    background: #003B5C;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 0 18px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}
#siom-chatbot-send:hover { background: #005a8a; }
#siom-chatbot-send:disabled { opacity: 0.5; cursor: not-allowed; }
#siom-chatbot-footer {
    font-size: 10.5px;
    text-align: center;
    color: #8899aa;
    padding: 6px;
    background: #f8fafc;
    border-top: 1px solid #eef2f5;
}
@media (max-width: 480px) {
    #siom-chatbot-window {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 80px;
    }
}
