html, body {
  height: 100%;
}

body
{
  overflow: hidden;
}

#main_container
{
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  position: absolute;

  background-color: #333336;
  min-width: 1100px;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;

  display: flex;
  flex-direction: column;
}

#layout_container
{
  flex: 1 1 auto;
  max-height: calc(100vh - 60px);
  display: flex;
}

body.sidebar-left #layout_container
{
  flex-direction: row-reverse;
}

#layout_main_container
{
  /* overflow-y: auto; */
  flex: 1 1 auto;
  
  > .simplebar-track.simplebar-vertical
  {
    top: 5px;
    bottom: 5px;
  }
}

@media (min-width: 1780px)
{
  body.sidebar-left.sidebar-expanded #layout_main_container
  {
    padding-left: 512px;
  }
}

#layout_main
{
  padding: 15px 15px 25px 25px;
}

#layout_sidebar
{
  padding: 15px 15px 0 5px;
  flex: 0 0 370px;
  width: 370px;
  max-width: 370px;
  display: flex;
  flex-direction: column;
}

#layout_footer
{
  flex: 0 0 60px;
  display: flex;
  align-items: center;
  clear: both;
  border-top: 1px solid #eeeeec;
  font-size: 0.9em;
  box-sizing: border-box;
}

#footer_ajax
{
  width: 24px;
  height: 21px;
  text-align: center;
  margin-left: 24px;
  background-image: url('/images/ajax-loader.png');
  opacity: 0;
  animation: play .8s steps(12) infinite;
}

@keyframes play {
   from { background-position:    0px; }
     to { background-position: -288px; }
}

#footer_box_left
{
  display: flex;
  align-items: center;
}

#footer_box_right
{
  color: #ccc;
  text-align: right;
  flex: 1 1 auto;
  margin-right: 25px;
  display: flex; 
  justify-content: flex-end;
}

#alert_container, #confirm_container
{
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 20000;
  background-color: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

#alert, #confirm
{
  width: 400px;
  min-height: 100px;
  border-radius: 5px;
  background-color: #333336;
  border: 1px solid #eeeeec;
  padding: 15px 15px 70px 15px;
  position: relative;
}

#alert_message, #confirm_message
{
  white-space: pre-line;
}

#alert_buttons, #confirm_buttons
{
  position: absolute;
  left: 15px;
  bottom: 15px;
  width: calc(100% - 30px);
  border-top: 1px solid #eeeeec;
  padding-top: 15px;
}

#layout_modal_overlay
{
  background-color: rgba(0,0,0,0.75);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9998;
  display: none;
}

body.modal-open #layout_modal_overlay
{
  display: block;
}

#layout_modal_container
{
  display: none;
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: -400px;
  width: 800px;
  min-width: 675px;
  height: 100%;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

@media (max-width: 1600px)
{
  body.sidebar-left #layout_modal_container
  {
    left: 400px;
    margin-left: 0;
  }
  
  body.sidebar-right #layout_modal_container
  {
    left: auto;
    right: 400px;
    margin-left: 0;
  }
}

@media (max-width: 1225px)
{
  #layout_modal_container
  {
    width: calc(100vw - 425px);
  }
}

/*
@media (max-width: 1100px)
{
  #layout_modal_container
  {
    left: auto;
    right: 400px;
    margin-left: 0;
  }
}
*/

body.modal-open #layout_modal_container
{
  display: flex;
}

#layout_modal_window
{
  color: #eeeeec;
  border-radius: 5px;
  background-color: #333336;
  border: 1px solid #eeeeec;
  padding: 10px;
/*  overflow: auto; */
  max-height: 90%;
  width: 100%;
  
  > .simplebar-track.simplebar-vertical
  {
    right: 1px;
    top: 3px;
    bottom: -5px;
  }
}

#obmenu {
  z-index: 15000;
  position: relative;
}

body.modal-open #obmenu
{
  z-index: 9997;
}
