/* General styles */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #fff;
    font-size: 14px;
}

strong {
    font-weight: bold;
}

p {
    margin-top: 1em;
    margin-bottom: 1em;
}

.message-error,
.message-info {
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 1em;
}

.message-error {
    color: red;
}

.message-info {
    color: green;
}

span.validation {
    color: red;
    font-size: 0.93em;
    padding-left: 0.7em;
    vertical-align: middle;
    white-space: nowrap;
}

.loading-icon {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.07);
    display: none;
    z-index: 100;
}

.loading-icon > div {
    position: fixed;
    left: 50%;
    top: 50%;
    padding: 5px;
    padding-bottom: 3px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.4);
    z-index: 110;
}

.loading-icon img {
}

.popup-backdrop {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: none;
}


/* Utility classes */

.shadow {
    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.10);
}

.shadow-medium {
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.12), 0 2px 4px 0 rgba(0,0,0,0.08);
}

.shadow-large {
    box-shadow: 0 15px 30px 0 rgba(0,0,0,0.11), 0 5px 15px 0 rgba(0,0,0,0.08);
}

.shadow-inner {
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.06);
}

.aspect-outer {
    height: 0;
    position: relative;
    padding-top: 56.25%;
}

.aspect-inner {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.absolute-centered {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    margin: auto;
}

.opacity-hover {
    opacity: 1.0;
    transition-property: opacity;
    transition-duration: 0.08s;
    cursor: pointer;
}

.opacity-hover:hover {
    opacity: 0.7;
}

.scale-hover {
    transform: scale(1.0);
    transition-property: transform;
    transition-duration: 0.15s;
    cursor: pointer;
}

.scale-hover:hover {
    transform: scale(1.02);
}

.readable-narrow {
    max-width: 23em; /* ~45 chars */
}

.readable-medium {
    max-width: 34em; /* ~68 chars */
}

.readable-wide {
    max-width: 46em; /* ~90 chars */
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.2em;
}


/* Form control styles */

input,
select,
button,
a.button,
textarea {
    box-sizing: border-box;
    padding: 0.43em 0.86em;
    line-height: 143%;
    border: 1px solid #ccc;
    border-radius: 0.29em;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    text-decoration: none;
    font-family: inherit;
    font-size: 100%;
    background-color: white;
}

input[type=button],
input[type=submit],
a.button,
button {
    cursor: pointer;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
    display: inline-block;
    color: #333;
    background-color: #fff;
    transition: background-color 0.1s;
    padding-top: 0.22em;
    padding-bottom: 0.22em;
} 

input[type=button]:hover,
input[type=submit]:hover,
a.button:hover,
button:hover {
    background-color: #e6e6e6;
}

input[type=button]:focus,
input[type=submit]:focus,
a.button:focus,
button:focus  {
    border-color: #7c9ed5;
}

input[type=text],
input[type=password],
select,
textarea {
    background-color: white;
    color: #666;
    padding: 0.14em 0.43em;
}

input:focus,
select:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: 0 0 4px rgba(102,175,233,.6);
}

input:disabled,
select:disabled,
input:disabled:hover,
select:disabled:hover {
    background-color: #ececec;
    cursor: default;
    color: #666;
}

input.primary-button {
    color: white;
    padding-left: 1.79em;
    padding-right: 1.79em;
    background-color: #3d9bd8;
}

input.primary-button:hover {
    background-color: #79b9e3;
}


/* Forms */

.form-table {
}

.form-table > tbody > tr > td, 
.form-table > tbody > tr > th {
    padding-top: 0.3em;
    padding-bottom: 0.3em;
    vertical-align: top;
}


.form-table > tbody > tr > th {
    text-align: left;
    padding-right: 1em;
    padding-top: 0.7em;
}

.form-table > tbody > tr > td > input[type=checkbox] {
    display: inline-block;
    height: 1.3em;
    margin-left: 0;
}

.form-table span.static-value {
    display: inline-block;
    padding-top: 0.33em;
}

.field-note {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 0.9em;
    color: #909090;
    padding-top: 0.25em;
    padding-bottom: 0.3em;
    max-width: 40em;
    line-height: 125%;
    font-style: italic;
}

.checkbox-list {
    margin-top: 0.1em;
}

.checkbox-list td {
    vertical-align: top;
}

.checkbox-list td:nth-child(1) {
    padding-top: 0.15em;
    padding-right: 0.3em;
}

.checkbox-list input {
    margin-left: 0;
}

.checkbox-list label {
    line-height: 150%;
}


/* Left column */

.page-outer {
    background-color: #c6d5e4;
    background-image: linear-gradient(#ffffff, #afbac5);
    position: fixed;
    width: 100%;
    height: 100%;
}

.left-col {
    padding: 1em;
    width: 25em;
    height: 100%;
    left: 0;
    top: 0;
    overflow-y: auto;
    box-sizing: border-box;
}

.server-box {
    margin-bottom: 1em;
}

.left-col select {
    width: 100%;
}

.left-col option {
}

.database-box {
    margin-bottom: 2em;
}

.tables-box {
}

.table-listing {
    display: table;
    width: 100%;
    margin-bottom: 0.6em;
}

.table-name {
    display: table-cell;
    text-align: left;
    vertical-align: middle;
}

.table-buttons {
    display: table-cell;
    text-align: right;
    vertical-align: middle;
}

.table-buttons a {
    display: inline-block;
    text-decoration: none;
    border: 1px solid #d2d2d2;
    background-color: white;
    color: black;
    width: 1.6em;
    text-align: center;
    padding-top: 0.2em;
    padding-bottom: 0.3em;
    border-radius: 4px;
    transition: background-color 0.1s;
}

.table-buttons a:hover {
    background-color: #e4e4e4;
}


/* Right column */

.right-col {
    position: absolute;
    left: 26em;
    top: 1em;
    right: 1em;
    bottom: 0;
    box-sizing: border-box;
    height: 100%;
}

.query-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
}

.query-pane textarea {
    width: 100%;
    height: 81%;
    font-family: Consolas, monospace;
}

.results-pane {
    height: 50%;
    overflow: auto;
    position: absolute;
    bottom: 1em;
    left: 0;
    right: 0;
    padding-bottom: 1em;
}

.query-buttons {
    display: inline-block;
    padding-top: 0.2em;
}

#RecordCount {
    margin-left: 1em;
    line-height: 125%;
}

.query-buttons > * {
    display: inline-block;
    vertical-align: middle;
}

.flashed-messages {
    display: inline-block;
    margin-left: 1em;
}

.flashed-messages > div {
    display: inline-block;
}


/* Query results data */

.list-view {
    border-collapse: collapse;
    font-size: 0.75rem;
    max-width: 100%;
}

.list-view tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.list-view tr:nth-child(even) {
    background-color: white;
}

.list-view td,
.list-view th {
    border-bottom: 1px solid #ddd;
    padding: 0.5em;
    padding-top: 0.2em;
    padding-bottom: 0.2em;
    vertical-align: middle;
    text-align: left;
    line-height: 125%;
    white-space: pre-wrap;
}

.list-view .nowrap {
    white-space: nowrap;
}

.list-view th {
    font-weight: bold;
    white-space: nowrap;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding-top: 0.2em;
    padding-bottom: 0.2em;
}

.list-view th img {
    opacity: 0.6;
    vertical-align: middle;
}

.list-view th a {
    color: #666;
    text-decoration: none;
}

.list-view td:last-child {
}

input.invalid {
    background-color: #ffe8e8;
}

.pager {
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-left: 1em;
    margin-bottom: -0.4em;
}

.pager span {
    display: block;
    float: left;
    line-height: 23px;
    margin-right: 10px;
}

.pager a {
    display: block;
    float: left;
    margin-right: 7px;
    margin-bottom: 7px;
    text-decoration: none;
    color: #383f4f;
    border-radius: 3px;
    width: 23px;
    line-height: 23px;
    text-align: center;
    vertical-align: middle;
}

.pager a:link,
.pager a:visited {
    background-color: #ffffff;
}

.pager a:hover,
.pager a:active {
    background-color: #ddd;
}

.pager a.current {
    background-color: #ccc;
    border: 1px solid #aaa;
    line-height: 21px;
    box-sizing: border-box;
    cursor: default;
}

.pager a.inactive {
    cursor: default;
}

.pager a.arrow-disabled {
    background-color: white;
    color: #ccc;
    cursor: default;
}

.list-view dl {
    overflow: hidden;
}

.list-view dt {
    font-weight: bold;
    float: left;
    clear: left;
    width: 18em;
    margin-right: 1em;
}

.list-view dd {
    float: left;
}

.list-view dt,
.list-view dd {
    margin-bottom: 0.5em;
}
