body {
    background-color: #fffcf2;
    font-family: sans-serif;
    margin: 0 0 0 0;
    padding: 0 0 0 0;
}

#container {
    max-width: 1000px;
    min-width: 400px;
    min-height: 230px;
    background-color: #F6F3E9;
    margin-left: auto;
    margin-right: auto;
    -moz-box-shadow: 5px 5px 5px #ccc;
    -webkit-box-shadow: 5px 5px 5px #ccc;
    box-shadow: 5px 5px 5px #ccc;
}

#header {
    height: 130px;
    background: url('/static/logo.png') no-repeat scroll left top #39322b;
}

#content {
    max-width: 1000px;
    min-width: 400px;
    min-height: 100px;
}

#main {
    padding-left: 0.5em;
    padding-right: 0.5em;

}

#footer {
    font-size: small;
    color: #a6a399;
    text-align: right;
    margin-right: 30px;
}

/* Header {{{ */
#header .area {
  width: 300px;
  height: 130px;
  position: relative;
  margin-left: 230px;
  color: white;
  font-size: xx-large;
  font-family: monospace;
  overflow: hidden;
  z-index: 2;
}

#header .bubble {
  position: absolute;
  left: 93px;
  top: 21px;
  width: 135px;
  height: 84px;
  display: table;
}

#header .bubble p {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}

#header a {
    text-decoration: none;
    color: white;
    cursor: pointer;
    white-space: nowrap;
    text-shadow: #27211b 2px 2px 2px;
}

#header a:hover {
  background-color: #39a9cf;
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  border-radius: 5px;
  text-shadow: #27211b 1px 1px 1px;
  -moz-box-shadow: 5px 5px 5px #222;
  -webkit-box-shadow: 5px 5px 5px #222;
  box-shadow: 5px 5px 5px #222;

}

#nav-container {
    position: relative;
    height: 130px;
    top: -130px;
    left: 0%;
}

ul#primary-nav {
  display: block;
  margin-right: 60px;
  text-align: right;
  margin-top: 90px;
  line-height: 20px;
  cursor: default;
  position: relative;
  top: -2ex;
}

ul#primary-nav li {
  display: inline;
  padding: 0 4px;
}

ul#primary-nav li a {
  padding: 6px;
  font-variant: small-caps;
  font-weight: bold;
  white-space: nowrap;
}


#donate {
  display: block;
  width: 200px;
  height: 38px;
  overflow: hidden;
  position: relative;
  top: -260px;
  left: 65%;
}

#calibre-home-link {
    position: relative;
    top: -298px;
    left: 0%;
    z-index: 2;
    height: 130px;
    width: 230px;
    cursor: pointer;
}

h2.library_name {
    font-family: monospace;
    font-size: 50px;
    font-weight: normal;
    color: white;
    margin-left: 250px;
    padding-top: 40px;
}

/* }}} */

/* Sort select  {{{ */

.sort_select { 
    float: left;
    margin-left: 1em;
    margin-top: 2ex;
    max-height: 2.75em;
    overflow: hidden;
}

.sort_select label {
    font-size: medium;
}

/* }}} */

/* Search bar {{{ */

#search_box {
    float: right;
    margin-right: 1em;
    margin-top: 2ex;
    max-height: 2.75em;
    overflow: hidden;
}

#search_box .ui-button {
    padding: 0.25em;
}

/* }}} */

/* Top level {{{ */
.toplevel ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.toplevel li {
    margin: 0.75em;
    padding: 0.75em;
    cursor: pointer;
    font-size: larger;
    float: left;
    border-radius: 15px;
    -moz-border-radius: 15px;
    -webkit-border-radius: 15px;
    display: inline;
    width: 250px;
    height: 48px;
    overflow: hidden;

}

.toplevel li a { text-decoration: none; }

.toplevel li img {
    vertical-align: middle;
    margin-right: 1em;
}

.toplevel li:hover {
    background-color: #d6d3c9;
    font-weight: bold;
    -moz-box-shadow: 5px 5px 5px #ccc;
    -webkit-box-shadow: 5px 5px 5px #ccc;
    box-shadow: 5px 5px 5px #ccc;

}

.toplevel li span.url { display: none }
.toplevel li span.label {
}


/* }}} */

/* Category {{{ */
.category > div.category-container {
    width: 100%;
    margin-top: 1ex;
    margin-bottom: 1ex;
    display: table;
}

.category div.category-item {
    display: table-row;
}

.category div.category-item > div {
    padding: 0.75em;
    text-align: center;
    cursor: pointer;
    display: table-cell;
}

.category div.category-name { font-weight: bold }

.category div.category-item:hover > div {
    background-color: #d6d3c9;
    -moz-box-shadow: 5px 5px 5px #ccc;
    -webkit-box-shadow: 5px 5px 5px #ccc;
    box-shadow: 5px 5px 5px #ccc;
    border-radius: 15px;
    -moz-border-radius: 15px;
    -webkit-border-radius: 15px;

}

.category div.category-item a { text-decoration: none; color: inherit; }

#groups a.load_href { 
    text-decoration: none;
    color: inherit;
    font-size: medium;
    font-weight: normal;
    padding: 0;
    padding-left: 0.5em;
}

#groups h3 {
    font-weight: bold;
    margin-top: 1ex;
    padding-left: 30px;
    padding-top: 0.5ex;
    padding-bottom: 0.5ex;
}

#groups h3 span {
    font-weight: normal
}

/* }}} */

/* Booklist {{{ */

#booklist .page { 
    display: none; 
}

#booklist .load_data { display: none }

.loading img {
    vertical-align: middle;
}

#booklist .summary {
    margin-bottom: 2ex;
    border-bottom: solid 1px black;
}

#booklist div.left {
    float: left;
    height: 190px;
    width: 100px;
    vertical-align: middle;
    text-align: center;
    margin-left: 1em;
    margin-right: 2em;
}

#booklist div.left img {
    display: block;
    margin-bottom: 1ex;
    margin-left: auto;
    margin-right: auto;
}

#booklist div.right {
    height: 190px;
    overflow: auto;
    margin-left: 1em;
    margin-right: 1em;
}

#booklist div.right .stars {
    float:right;
    margin-right: 1em;
}

#booklist div.right .stars .rating_container {
    display: block;
}

#booklist div.right .stars .series {
    display: block;
}

#booklist .title {
    font-size: larger;
}

#booklist a {
    text-decoration: none;
    color: blue;
}

#booklist a:hover {
    color: red;
}

#booklist a.summary_thumb img {
    border: none
}

#booklist > #pagelist { display: none; }

#goto_page_dialog ul {
    list-style-type: none;
    font-size: medium;
}

#goto_page_dialog li {
    margin-bottom: 1.5ex;
}

#goto_page_dialog a {
    text-decoration: none;
    color: blue;
}

#goto_page_dialog a:hover {
    color: red;
}

#booklist .left .ui-button-text {
    font-size: medium;
    color: black;
    padding-left: 0.25em;
    padding-right: 0.25em;
    padding-top: 0.25em;
    padding-bottom: 0.25em;
}

#booklist .listnav {
    display: table;
    width: 100%;
}

#booklist .listnav a {
    color: blue;
    text-decoration: none;
}

#booklist .listnav a:hover {
    color: red;
}

#booklist .topnav {
    border-bottom: solid black 1px;
    margin-bottom: 1ex;
}

#booklist .navleft {
    display: table-cell;
    text-align: left;
}

#booklist .navleft a {
    margin-right: 1em;
}

#booklist .navmiddle {
    display: table-cell;
    text-align: center;
}

#booklist .navright {
    display: table-cell;
    text-align: right;
}

#booklist .navright a {
    margin-left: 1em;
}

/* }}} */

/* Details {{{ */

.details .left {
    float: left;
    max-width: 50%;
    margin-right: 2em;
    overflow: auto;
}

.details .right {
    overflow: auto;
}

.details .formats {
    margin-bottom: 2ex;
}

.details .right .formats a {
    color: blue;
    text-decoration: none;
}

.details .right .formats a:hover {
    color: red;
}

.details .field {
    margin-bottom: 0.5em;
}

.details .comment {
    margin-left: 1em;
    overflow: auto;
    max-height: 50%;
}

.details a.details_category_link {
    text-decoration: none;
    color: blue
}

.details a.details_category_link:hover {
    color: red
}

.details a.details_thumb img {
    border: none
}

.details #random_button {
    display:block
}


/* }}} */

