#b4d_CloseDiv
{
    position:relative;
    width:95vw;
    max-width:100px;
    margin:0 auto; 
    z-index:999999999999999999999999999999999999999 !important;



    width:100%;
    max-width:1000px;
    padding-top:0;
    margin-top:0;
    top:0 !important;

}

#b4d_CloseBtn
{

    
    margin-left:-120px;




    font-size:10px;
    min-width: 50px;
    width:50px;
    padding: 2px;
    margin:auto;
    padding-top:0;
    margin-top:0;
    position:fixed;
    top:0 !important;



}

html, body {
   /*  -webkit-overflow-scrolling: touch; */

    position: relative; 
    height: 100%; 
    
 
  }



  

  #b4d_container
  {
     transform:translate3d(0,0,0); 
   
       overflow: scroll !important; 
      -webkit-overflow-scrolling: touch !important;

      position:absolute;
      top:0;

      overflow-x: hidden !important; 

    /*  overflow: hidden !important; */

      max-height:100vh;
      
  }




#b4d_dialog
{
     transform:translate3d(0,0,0); 

    position:fixed !important; 

    
    
    z-index:2147483646;

    top:0 !important;
    left: 0; 
    right:0;
    bottom:0;
    height:100vh;
    max-height:100vh;
    width:100%;
    background-color:rgba(0,0,0, 0.6)  !important;

    
    display: flex;
    flex-direction: column;
    align-items: stretch;flex: 1;
    /*
    position:relative;
    
    
     ;

    
    
    margin: auto;
    position: fixed;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;flex: 1;
*/
/*  overflow: hidden; */
    width: 100%;
  /*  height: 100%; */
    border: none;




   
    background-color:rgb(0, 0, 0, 0.5); 
    overflow: scroll !important; 
    -webkit-overflow-scrolling: touch !important;

    
    overflow-x: hidden !important; 
 /*
    overflow: hidden !important; 
    */

}

#b4d_widget
{
    transform:translate3d(0,0,0); 
    position: absolute !important; 
    top:0 !important; 
    left:0 !important; 
    right:0 !important; 
    bottom:0 !important; 
    margin:auto;
    margin-top:0px;
    width:100% !important; 
    max-width:1000px;
    height:100%; 
    max-height:100%;
    min-height:100%;
    width:100vw;
    flex: 1;
    box-shadow: 0 0 5px #000000; 
    z-index:2147483646 !important; 
    border: 0 !important; 
    visibility: visible; 
    opacity: 1;
     overflow: scroll !important; 
    -webkit-overflow-scrolling: touch !important; 
}



@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait) {
    #b4d_container, #b4d_dialog, #b4d_widget {                           
        height: 1024px;                         
    }                       
}   
                                            
/* iPad with landscape orientation. */                       
@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:landscape) {                         
    #b4d_container, #b4d_dialog, #b4d_widget {                           
        height: 768px;                         
    }                       
}




                                               
/* iPhone 5 
You can also target devices with aspect ratio. */                       
@media screen and (device-aspect-ratio: 40/71) {                              
    #b4d_container, #b4d_dialog, #b4d_widget {                           
        height: 500px;                         
    }                       
}




@media only screen and (max-width : 1000px)
{

    #b4d_CloseDiv
    {

        width:100%;
        text-align:center;
       

    }


    #b4d_CloseBtn
    {
    

        
        margin:0 auto;
    }


    #b4d_widget
    {
       
        
    }

    #b4d_dialog
    {
      
    
    }
    
}