/*
 * layout_structure.css
 */


/* ------------------------------------------------------------------------
 *   Compatibility utilities from bootstrap
 * ------------------------------------------------------------------------ */

.visible-phone {
  display: none;
}
  .MobileDevice .visible-phone {
    display: inherit !important;
  }


/* ------------------------------------------------------------------------
 *   Main structure for desktop (default)
 * ------------------------------------------------------------------------ */

.layout-container {
  max-width: 1170px;
  min-width: 980px;
  margin: 0 auto;
  padding: 0 5px;
}

#g_top_header {
}
  #g_top_header .layout-container {
    /* Fixes those browsers which have different z-index stacking contextes,
     * most notably IE7, but violates the strict W3C rules */
    z-index: 10;
  }
  #g_top_header .row {
    float: right;
    width: 855px;
  }
  #g_top_header .change-version {
    float: left;
    width: 266px;
  }
  #g_top_header .login {
    float: left;
    width: 162px;
    margin-left: 25px;
  }
  #g_top_header .recover {
    float: left;
    width: 108px;
  }
  #g_top_header .auth-login {
    float: left;
    width: 266px;
    margin-left: 25px;
  }
  #g_top_header .cart {
    float: left;
    width: 268px;
    margin-left: 25px;
  }

#g_title_header {
}
  #g_title_header .layout-container {
    position: relative;
    /* Fixes those browsers which have different z-index stacking contextes,
     * most notably IE7, but violates the strict W3C rules */
    z-index: 1;
  }
  #g_title_header .logo {
    position: absolute;
    top: 0;
    left: 5px; /* layout-container padding */
    width: 270px; /* current logo is 250px, plus 10px margin each side */
  }
    #g_title_header .logo blockquote {
      position: absolute;
      left: 0px;
      top: 63px;
      width: 266px;
    }
  #g_title_header .search {
    margin-left: 300px;
    padding-top: 1px;
  }

#g_site_links {
}
  #g_site_links ul {
    width: 100%;
    min-width: 500px;
    display: table;
    table-layout: fixed;
  }
    #g_site_links ul li {
      display: table-cell;
      width: auto;
    }

#g_body {
}
  #g_body .inner-body {
    float: right;
    max-width: 870px;
    width: 75%;
  }
    #g_body .inner-body.no-sidebar {
      float: none;
      max-width: none;
      width: auto;
    }
  #g_body .sidebar-body {
    float: left;
    width: 23%;
  }
  #g_body .ads-body {
    clear: both;
    margin-left: -2%;
  }
    #g_body .ads-body .info-block {
      float: left;
      margin-left: 2%;
      margin-bottom: 20px;
      width: 31.33%;
      /* finally, a nice effect to squeeze them up to a 1024x768 resolution,
       * after that they will just wrap in two columns */
      min-width: 312px;
    }

/* alternative structure with absolutely positioned sidebar */
/*
#g_body {
}
  #g_body .inner-body {
    margin-left: 300px;
  }
  #g_body .sidebar-body {
    width: 270px;
    position: absolute;
    left: 5px;
    top: 0;
  }
*/


/* ------------------------------------------------------------------------
 *   Main structure for mobile devices (width=320)
 * ------------------------------------------------------------------------ */

@media (max-width: 980px) {

.MobileDevice .layout-container {
  max-width: 870px;
  min-width: 0;
  padding: 0 1px; /* i need this to avoid off-by-one bug that makes the
    horizontal scrollbar to appear in some situations */
}

/* transform the top header for mobiles, use only icons */
.MobileDevice #g_top_header .row {
  width: auto;
}
.MobileDevice #g_top_header div.dropdown-area {
  /* make it static so it's not a root element anymore, this means the width
   * and position of the dropdown menu will be relative to the layout */
  position: static;
}
/* remove the angle icon from the header buttons */
.MobileDevice #g_top_header a.header-button {
  background: none;
}
  .MobileDevice #g_top_header a.header-button:hover {
    background-color: transparent;
  }
  .MobileDevice #g_top_header a.header-button:active {
    background-color: #096aa1;
  }

/* remove other useless information */
.MobileDevice #g_top_header .change-version {
  width: 40px;
  text-align: center;
}
.MobileDevice #g_top_header .change-version span.icon {
  margin: 0;
}
.MobileDevice #g_top_header .change-version span.current {
  display: none;
}
.MobileDevice #g_top_header .change-version span.change {
  display: none;
}
.MobileDevice #g_top_header .login {
  margin-left: 5px;
  width: 40px;
  text-align: center;
}
  .MobileDevice #g_top_header .login span.icon {
    margin: 2px 0 0 0;
  }
  .MobileDevice #g_top_header .login span.text {
    display: none;
  }
.MobileDevice #g_top_header .auth-login {
  margin-left: 5px;
  width: 40px;
  text-align: center;
}
  .MobileDevice #g_top_header .auth-login span.icon {
    margin: 2px 0 0 0;
  }
  .MobileDevice #g_top_header .auth-login span.text {
    display: none;
  }
.MobileDevice #g_top_header .recover {
  display: none;
}
.MobileDevice #g_top_header .cart {
  margin-left: 10px;
  width: 40px;
  text-align: center;
}
  .MobileDevice #g_top_header .cart span.icon {
    margin: 2px 0 0 0;
  }
  .MobileDevice #g_top_header .cart span.text {
    display: none;
  }
  .MobileDevice #g_top_header .cart span.content {
    display: none;
  }

.MobileDevice #g_title_header .logo {
  left: 50%;
  margin-left: -135px;
}
.MobileDevice #g_title_header .search {
  display: none;
}

/* instead of table layout, we use fixed width floated elements */
.MobileDevice #g_site_links {
  clear: left;
}
  .MobileDevice #g_site_links ul {
    /* FIXME: overrides that shouldn't be necessary */
    display: block;
    min-width: 0;
    width: 100%;
    overflow: auto;
  }
    .MobileDevice #g_site_links ul li {
      display: block;
      float: left;
      width: 100px;
      height: auto;
    }
    .MobileDevice #g_site_links ul a {
      /* make it taller for easier touch */
      height: 36px;
      line-height: 36px;
    }

/* this is going to be all fullscreen and stacked blocks */
.MobileDevice #g_body {
}
  .MobileDevice #g_body .inner-body {
    float: none;
    max-width: none;
    width: auto;
  }
  .MobileDevice #g_body .sidebar-body {
    float: none;
    width: auto;
    clear: left;
  }
  .MobileDevice #g_body .ads-body {
    margin-left: 0;
  }
    .MobileDevice #g_body .ads-body .info-block {
      float: none;
      margin: 0 auto 10px;
    }

} /* end of @media */
