/* --- ESTILOS GENERALES Y OTROS --- */
#oskibot-chat-container {
    max-width: 100%;
    width: 100%;
   
    border: 1px solid #e9e9eb;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 485px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: all 0.3s ease-in-out;
}

.oskibot-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background-color: #f3f3f3;
    border-bottom: 1px solid #e9e9eb;
    flex-shrink: 0;
}

#oskibot-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.oskibot-message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.5;
    word-wrap: break-word;
    margin-bottom: 10px;
}

.bot-message {
    background-color: #f0f2f5;
    color: #1c1e21;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-message {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

#oskibot-form {
    display: flex;
    padding: 10px;
    border-top: 1px solid #e9e9eb;
    background-color: #ffffff;
    flex-shrink: 0;
}

/* --- ESTILOS PARA EL MODO EXPANDIDO (PANTALLA COMPLETA) --- */
#oskibot-chat-container.expanded {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: 100dvh;
    border-radius: 0;
    z-index: 9999;
    margin: 0;
}

/* --- BOTÓN DE EXPANDIR/CONTRAER --- */
#oskibot-fullscreen-toggle {
    display: none; /* Oculto por defecto en desktop */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #555;
    /* LA REGLA 'margin-left: auto' SE HA MOVIDO A LA MEDIA QUERY */
}

@media (max-width: 768px) {
    #oskibot-fullscreen-toggle {
        display: block; /* Visible solo en móvil */
        margin-left: auto; /* <-- CORRECCIÓN: El margen solo se aplica en móvil */
    }
}

#oskibot-fullscreen-toggle svg {
    width: 24px;
    height: 24px;
}

#oskibot-fullscreen-toggle .icon-collapse {
    display: none;
}

#oskibot-chat-container.expanded #oskibot-fullscreen-toggle .icon-expand {
    display: none;
}

#oskibot-chat-container.expanded #oskibot-fullscreen-toggle .icon-collapse {
    display: block;
}

/* --- ESTILOS COMPLEMENTARIOS (AVATAR, NOTIFICACIÓN, ETC.) --- */
#oskibot-notification-badge { position: absolute; top: 5px; left: 40px; width: 22px; height: 22px; background-color: #d93025; color: white; font-size: 13px; font-weight: bold; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid white; transform: scale(0); opacity: 0; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease; }
#oskibot-notification-badge.visible { transform: scale(1); opacity: 1; }
#oskibot-notification-badge.hidden-fade { transform: scale(0); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease; }
.oskibot-avatar { width: 40px; height: 40px; border-radius: 50%; background-color: #007bff; color: white; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 18px; flex-shrink: 0; }
.oskibot-info { display: flex; flex-direction: column; }
.oskibot-name { font-weight: bold; font-size: 16px; color: #1c1e21; }
.oskibot-status { font-size: 13px; color: #65676b; display: flex; align-items: center; gap: 5px; }
.status-dot { width: 8px; height: 8px; background-color: #31a24c; border-radius: 50%; border: 1px solid white; }
.typing-indicator { align-self: flex-start; }
.typing-indicator span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background-color: #b0b3b8; margin: 0 2px; animation: bounce 1.4s infinite ease-in-out both; }
.typing-indicator span:nth-child(2) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(3) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } }
#oskibot-input { flex-grow: 1; border: none; padding: 12px; border-radius: 24px; background-color: #f0f2f5; font-size: 16px; }
#oskibot-input:focus { outline: none; box-shadow: 0 0 0 2px #007bff40; }
#oskibot-submit-btn { background-color: transparent; border: none; cursor: pointer; padding: 8px 12px; color: #007bff; }
#oskibot-submit-btn svg { transition: transform 0.2s ease; }
#oskibot-submit-btn:hover svg { transform: scale(1.1); }