/* Login Intranet Omnihospital - User Menu Styles */

/* ========================================
   MENÚ DE USUARIO DESPLEGABLE
   ======================================== */

.lio-user-menu-floating {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 99999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Cuando hay admin bar de WordPress */
body.admin-bar .lio-user-menu-floating {
    top: 50px;
}

/* Botón del menú (colapsado) */
.lio-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 2px solid #c41e3a;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.lio-menu-toggle:hover {
    background: #fef2f2;
}

.lio-menu-toggle .lio-user-icon {
    color: #c41e3a;
    flex-shrink: 0;
}

.lio-menu-toggle .lio-chevron {
    color: #c41e3a;
    transition: transform 0.2s;
}

.lio-user-menu-floating.open .lio-menu-toggle .lio-chevron {
    transform: rotate(180deg);
}

/* Panel desplegable */
.lio-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    overflow: hidden;
}

.lio-user-menu-floating.open .lio-menu-dropdown {
    display: block;
    animation: slideDown 0.2s ease;
}

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

/* Info del usuario */
.lio-dropdown-header {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    background: #f9f9f9;
}

.lio-dropdown-header .lio-user-name-text {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.lio-dropdown-header .lio-user-email {
    display: block;
    color: #888;
    font-size: 12px;
}

/* Opciones del menú */
.lio-dropdown-menu {
    padding: 8px 0;
}

.lio-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.lio-dropdown-item:hover {
    background: #f5f5f5;
}

.lio-dropdown-item.logout {
    color: #c41e3a;
    border-top: 1px solid #f0f0f0;
    margin-top: 5px;
    padding-top: 12px;
}

.lio-dropdown-item.logout:hover {
    background: #fef2f2;
}

.lio-dropdown-item svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* ========================================
   SHORTCODE STYLES (si se usan)
   ======================================== */

.lio-user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lio-user-name-display {
    color: #c41e3a;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

.lio-logout-btn {
    display: inline-block;
    padding: 8px 16px;
    background: transparent;
    color: #c41e3a;
    border: 1px solid #c41e3a;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.lio-logout-btn:hover {
    background: #c41e3a;
    color: #fff;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .lio-user-menu-floating {
        top: 10px;
        right: 10px;
    }
    
    body.admin-bar .lio-user-menu-floating {
        top: 56px;
    }
    
    .lio-menu-dropdown {
        min-width: 200px;
    }
}

/* ========================================
   OCULTAR EN PÁGINA DE LOGIN
   ======================================== */

body.page-intranet-login .lio-user-menu-floating,
body:has(.lio-login-container) .lio-user-menu-floating {
    display: none !important;
}
