html {
	margin: 0;
	padding: 0;
	font-size: 100%;	
}

body {
	margin: 0 auto;
	padding: 0;
	font-family: sans-serif;
}

footer p {
    margin: 10px 0;
    color: #666;
}



/*
 * Cellar Table
 */

table.cave {
	width: 100%;
	border-collapse: collapse;
}

table.cave tr + tr {
	border-top: 1px solid #ddd;
}

table.cave th {
	font-weight: bold;
	text-align: left;
}

table.cave th, td {
	padding: 5px 7px;
	vertical-align: top;
}

table.cave th.vertical-head {
	border-right: 2px solid #ccc;
	background-color: #eee;
}

table.cave th + th,
table.cave th + td,
table.cave td + td,
table.cave td + th {
	border-left: 1px solid #ddd;
}

table.cave thead {
	border-bottom: 2px solid #ccc;
	background-color: #eee;
}

table.cave thead th {
	vertical-align: bottom;
}

table.cave tbody {
	border-bottom: 2px solid #ccc;
}

table.cave tfoot {
	border-top: 2px solid #ccc;
	background-color: #eee;
}

table.cave tbody th,
table.cave tfoot th {
	text-align: right;
}

table.cave th.date,
table.cave th.age,
table.cave th.number,
table.cave td.date,
table.cave td.age,
table.cave td.number {
	text-align: right;
	max-width: 90px;
}

table.cave td.abv-1 {
    color: #069;
    font-weight: bold;
}

table.cave td.abv-2 {
    color: #261;
    font-weight: bold;
}

table.cave td.abv-3 {
    color: #960;
    font-weight: bold;
}

table.cave td.abv-4 {
    color: #930;
    font-weight: bold;
}

table.cave td.abv-5 {
    color: #900;
    font-weight: bold;
}

table.cave + div {
    margin-top: 10px;
}

table.cave .cellar-quantity {
    width: 10%;
}

table.cave .cellar-brewery,
table.cave .cellar-beer,
table.cave .cellar-style {
    width: 25%;
}

table.cave .cellar-details {
    width: 15%
}

table.cave .stats-head {
    width: 10%;
}

table.cave .stats-column {
    width: 9%;
}

table.cave tr.zero-quantity td {
    color: #999;
}

table#table-bottles tbody tr:hover td {
    background-color: #f8f8f8;
    cursor: pointer;
}



/*
 * Beer
 */

h1 span.beer-name {
    display: block;
}

h1 span.beer-brewery {
    display: block;
    font-size: 70%;
}

p.beer-style {
    font-size: 140%;
}



/*
 * Stats List
 */

ul.stats {
    margin: 0;
    padding: 0;
    border-top: 2px solid #ccc;
    border-bottom: 2px solid #ccc;
}

ul.stats li {
    list-style: none;
    padding: 5px 7px;
}

ul.stats li + li {
    border-top: 1px solid #ddd;
}



/*
 * Tablesort
 */

th.sort-header::-moz-selection,
th.sort-header::selection {
    background: transparent;
}

th.sort-header {
    cursor: pointer;
}

th.sort-header::-moz-selection,
th.sort-header::selection {
    background: transparent;
}

table th.sort-header:after {
    content: '';
    float: right;
    margin-top: 7px;
    margin-left: 5px;
    border-width: 0 4px 4px;
    border-style: solid;
    border-color: #404040 transparent;
    visibility: hidden;
}

table th.sort-header:hover:after {
    visibility: visible;
}

table th.sort-up:after,
table th.sort-down:after,
table th.sort-down:hover:after {
    visibility: visible;
    opacity: 0.4;
}

table th.sort-up:after {
    border-bottom: none;
    border-width: 4px 4px 0;
}



/*
 * Bootstrap
 */

.input-group-btn select {
    background-color: #eee;
    border-color: #ccc;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 7px;
    padding-bottom: 7px;
}

span.form-control-feedback {
    pointer-events: auto;
    cursor: pointer;
}



/*
 * jQuery UI
 */

ul.ui-autocomplete {
    margin-top: -1px;
    border: 1px solid #ddd;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
    background-color: #fff;
    z-index: 1200;
}

ul.ui-autocomplete li + li {
    border-top: 1px solid #ddd;
}

ul.ui-autocomplete li.ui-state-focus {
    background-color: #eee;
    margin: 0;
}



/*
 * Dialogs
 */

#dialog-container
{
    display: none;
    min-height: 100%;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

#dialog-container .dialog-wrapper
{
    background-color: #fff;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.75);
    display: none;
    margin: 100px auto;
    position: relative;
    width: 780px;
    z-index: 1100;
}

#dialog-container .dialog-wrapper .close
{
    background: url('../images/close.png');
    cursor: pointer;
    height: 30px;
    position: absolute;
    left: -15px;
    top: -15px;
    width: 30px;
}

#dialog-container .dialog-wrapper .close:hover,
#dialog-container .dialog-wrapper .close:active
{
    background: url('../images/close-down.png');
}

#dialog-container .dialog-wrapper .dialog {
    max-height: 600px;
    padding: 20px;
    overflow-y: auto;
}

#dialog-container .dialog h1
{
    margin-top: 0;
}

#dialog-background
{
    background-color: rgba(0, 0, 0, 0.5);
    height: 100%;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}



/*
 * Loading Animation
 */

/* Animation keyframes */
@-webkit-keyframes spin
{
    from
    {
        -webkit-transform: rotate(0deg);
    }
    to
    {
        -webkit-transform: rotate(360deg);
    }
}
 
/* Loading animation container */
.loading
{
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 202px;
    height: 202px;
    margin: -101px 0 0 -101px;
    z-index: 1200;
}
 
/* Spinning circle (inner circle) */
.loading .spinner .masked-circle
{
    width: 180px;
    height: 180px;
    border-radius: 100px;
    border: 20px solid #fff;
}
 
/* Spinning circle mask */
.loading .spinner .mask
{
    width: 100px;
    height: 100px;
    overflow: hidden;
}
 
/* Spinner */
.loading .spinner
{
    position: absolute;
    left: 1px;
    top: 1px;
    width: 200px;
    height: 200px;
    -webkit-animation: spin 1s infinite linear;
}

@media only screen and (max-width: 535px),
only screen and (max-device-width: 535px)
{
	#dialog-container .dialog
	{
		width: calc(100% - 65px);
	}
	
	#dialog-container .dialog input
	{
		max-width: calc(100% - 16px);
	}
}
