/* Estilos específicos para Robustiana 2 (Sidebar Sidebar) */

/* El popup ahora es una barra lateral */
#scs-chatPopup {
    position: fixed !important;
    top: 0 !important;
    right: -450px !important;
    /* Empezar oculto fuera de pantalla */
    bottom: 0 !important;
    width: 400px !important;
    max-width: 90vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15) !important;
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    transform: none !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #fff !important;
    border: none !important;
}

/* Cuando el chat está abierto (clase scs-chat-open en body) */
body.scs-chat-open #scs-chatPopup {
    right: 0 !important;
}

#scs-chatPopup #scs-app {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    /* overflow: hidden !important; */
}

#scs-mainHeader {
    border-radius: 0 !important;
    padding: 20px !important;
    flex-shrink: 0 !important;
}

#scs-startChatForm {
    background: #fff !important;
}

/* Ajuste de contenedores para sidebar */
#scs-startChatForm,
#scs-chatInterface {
    flex-grow: 1 !important;
    display: flex;
    flex-direction: column !important;
    /* overflow: hidden !important; */ /* CAMBIO: Comentado para habilitar el scroll */
}

#scs-chat-container {
    flex-grow: 1 !important;
    height: auto !important;
    overflow-y: auto !important;
}

.scs-chat-input-area {
    flex-shrink: 0 !important;
    border-top: 1px solid #eee !important;
    padding: 15px !important;
}

/* Ocultar burbuja con estilo al abrir */
body.scs-chat-open #scs-chatBubble {
    opacity: 0 !important;
    transform: scale(0) rotate(180deg) !important;
    pointer-events: none !important;
}

/* --- Menú de Hamburguesa en Cabecera (Robustiana 2) --- */

#scs-chatPopup #scs-mainHeader {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 15px 45px 15px 15px !important; /* Más espacio a la izquierda para el menú, y a la derecha para el close */
    position: relative !important;
}

#scs-chatPopup #scs-mainHeader h2 {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: var(--scs-title-color, var(--scs-primary-text-color, #ffffff)) !important;
}

/* Botón de Hamburguesa */
.scs-header-menu-btn {
    background: none !important;
    border: none !important;
    color: var(--scs-title-color, var(--scs-primary-text-color, #ffffff)) !important;
    cursor: pointer !important;
    padding: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    transition: background-color 0.2s ease !important;
    flex-shrink: 0 !important;
    margin-right: 8px !important;
}

.scs-header-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.scs-header-menu-btn svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
}

/* Botón de cierre superior en cabecera */
#scs-chatPopup #scs-closeChatBtn {
    color: var(--scs-title-color, var(--scs-primary-text-color, #ffffff)) !important;
}

/* Menú Desplegable (Hamburguesa) */
.scs-header-dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 15px !important;
    width: 220px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    padding: 10px !important;
    display: none !important; /* Oculto por defecto */
    flex-direction: column !important;
    gap: 8px !important;
    z-index: 1000000 !important;
    animation: scsFadeInDownMenu 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.scs-header-dropdown-menu.scs-show-menu {
    display: flex !important;
}

@keyframes scsFadeInDownMenu {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botones dentro del desplegable */
.scs-header-dropdown-menu .scs-btn {
    width: 100% !important;
    text-align: left !important;
    justify-content: flex-start !important;
    padding: 10px 12px !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    border: 1.5px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #475569 !important; /* Slate-600 */
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.scs-header-dropdown-menu .scs-btn:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

.scs-header-dropdown-menu .scs-btn svg {
    margin-bottom: 0 !important;
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

/* Sobreescritura del botón de accesibilidad en el desplegable */
.scs-header-dropdown-menu #scs-accessibilityBtn {
    background: var(--scs-primary-color, #4f46e5) !important;
    color: var(--scs-primary-text-color, #ffffff) !important;
    border: 1.5px solid var(--scs-primary-color, #4f46e5) !important;
}

.scs-header-dropdown-menu #scs-accessibilityBtn:hover {
    filter: brightness(1.08) !important;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    #scs-chatPopup {
        width: 100vw !important;
        max-width: 100vw !important;
        right: -100vw !important;
        height: 100vh !important; /* Fallback */
        height: 100dvh !important;
        max-height: 100vh !important; /* Fallback */
        max-height: 100dvh !important;
    }
    
    #scs-chatPopup #scs-app {
        height: 100% !important;
        max-height: 100dvh !important;
    }

    body.scs-chat-open #scs-chatPopup {
        right: 0 !important;
    }
}
/*ssss*/
