/**
 * Copyright (c) 2016 Weitian LI <liweitianux@live.com>
 * MIT license
 *
 * Stylesheet for the Web UI of "fg21sim"
 *
 * Credit:
 * [1] Milligram:
 *     https://milligram.github.io/
 *     https://github.com/milligram/milligram.github.io
 * [2] Bootstrap:
 *     https://getbootstrap.com/css/
 * [3] Font Awesome:
 *     http://fontawesome.io/
 */


/**
 * Basic styles
 */
body {
    background-color: #f7f7f7;
}

h1, h2, h3, h4, h5, h6 {
    color: #9b4dca;
}

p {
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

/**
 * Screen reader only
 * Credit: refs.(2, 3)
 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


/**
 * Header with fixed navigation banner
 */
header.masthead {
    /* Prevent fixed navigation banner hiding main contents */
    margin-bottom: 7rem;
}


/**
 * Prevent fixed navigation banner hiding anchor target
 *
 * Credit:
 * [1] https://css-tricks.com/hash-tag-links-padding/
 * [2] http://nicolasgallagher.com/jump-links-and-viewport-positioning/demo/
 *
 * FIXME: this invisible element overlaps above visible elements!
 *        may be related to the `milligram` CSS framework ??
 */
/*
:target {
    margin-top: -7rem;
    padding-top: 7rem;
    background-clip: content-box;
}
*/


/**
 * Section headings
 */
.heading > .icon {
    margin-right: 0.2rem;
}
.heading > .toggle {
    opacity: 0.2;
    color: #606c76;
    font-size: 65%;
    vertical-align: middle;
    margin-left: 1rem;
    cursor: pointer;
}
.heading > .toggle:hover {
    opacity: 0.9;
}

/**
 * Navigation
 */
.navigation {
    background: #f1f1f1;
    border-bottom: 0.1rem solid #d1d1d1;
    display: block;
    width: 100%;
    height: 5.2rem;
    left: 0;
    max-width: 100%;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 100;
}
.navigation .container {
    padding-bottom: 0;
    padding-top: 0;
}
.navigation .logo {
    height: 2rem;
    position: relative;
    top: 0.3rem;
}
.navigation .navigation-title,
.navigation .title,
.navigation .description {
    display: inline;
    position: relative;
    font-size: 1.6rem;
    line-height: 5.2rem;
    padding: 0;
    text-decoration: none;
}
.navigation .title {
    font-size: 2.0rem;
    font-variant: small-caps;
    margin-right: 0.5rem;
}
.navigation .description {
    font-style: italic;
    margin-right: 2.5rem;
}
.navigation .navigation-list {
    list-style: none;
    margin-bottom: 0;
}
.navigation .navigation-item {
    float: left;
    margin-bottom: 0;
    margin-left: 2.5rem;
    position: relative;
}
.navigation .navigation-link {
    display: inline;
    font-size: 1.2rem;
    line-height: 5.2rem;
    padding: 0.3rem 0.5rem;
    margin-top: 1.5rem;
}


/**
 * Github stamp at the top-right corner
 */
.github {
    border: 0;
    color: #f4f5f6;
    fill: #9b4dca;
    height: 5.2rem;
    position: fixed;
    right: 0;
    top: 0;
    width: 5.2rem;
    z-index: 100;
}
.github:hover .octo-arm {
    animation:a 1.0s infinite;
}
@keyframes a {
    0%, 50% {
        transform: rotate(0);
    }
    25%, 75% {
        transform: rotate(-25deg);
    }
}


/**
 * Form styles
 */

/* Inline form */
label, legend {
    display: inline-block;
    margin-bottom: 0.5rem;
    line-height: 2.0;
}
.form-inline .form-group {
    display: inline-block;
    margin-bottom: 0;
    vertical-align: middle;
}
.form-inline .form-control {
    display: inline-block;
    width: auto;
    margin-bottom: 0;
    vertical-align: middle;
}
.form-inline .checkboxes {
    display: inline-block;
    margin-bottom: 0;
    vertical-align: middle;
}

/* Checkboxes & Radios */
.checkboxes .legend,
.radios .legend {
    margin-right: 0.5rem;
}
.checkboxes .form-control,
.radios .form-control {
    margin-right: 0.5rem;
}
.checkboxes .form-group label,
.radios .form-group label {
    margin-right: 2.5rem;
    padding-top: 0.2rem;
    font-weight: normal;
}

/* Validation */
input:valid {
    border-color: #5cb85c;
}
input:invalid {
    border-color: #d9534f;
    box-shadow: 0 0 2px #d9534f;
}
input[type="radio"]:invalid,
input[type="checkbox"]:invalid {
    box-shadow: 0 0 1px 2px #d9534f;
}
input:focus {
    box-shadow: none;
}


/**
 * Label styles (general usage)
 */
.label {
    display: inline;
    padding: 0.2rem 0.6rem 0.3rem 0.6rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    color: #fff;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}
.label-small {
    font-size: 0.8rem;
}
.label-default {
    background-color: #777;
}
.label-primary {
    background-color: #337ab7;
}
.label-success {
    background-color: #5cb85c;
}
.label-info {
    background-color: #5bc0de;
}
.label-warning {
    background-color: #f0ad4e;
}
.label-danger {
    background-color: #d9534f;
}

.label > .icon {
    margin-right: 0.2rem;
}


/**
 * Button styles
 */
button,
.button {
    text-transform: none;
    letter-spacing: 0;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.button-group button,
.button-group .button {
    margin-right: 1.5rem;
}

.button-small {
    font-size: 0.8rem;
    height: 2.8rem;
    line-height: 2.8rem;
    padding: 0 1.5rem;
}
.button-large {
    font-size: 1.4rem;
    height: 4.5rem;
    line-height: 4.5rem;
    padding: 0 2rem;
}

.button-success {
    background-color: #5cb85c;
    border-color: #5cb85c;
}
.button-success:hover,
.button-success:focus {
    background-color: #398439;
    border-color: #398439;
}
.button-info {
    background-color: #5bc0de;
    border-color: #5bc0de;
}
.button-info:hover,
.button-info:focus {
    background-color: #269abc;
    border-color: #269abc;
}
.button-warning {
    background-color: #f0ad4e;
    border-color: #f0ad4e;
}
.button-warning:hover,
.button-warning:focus {
    background-color: #d58512;
    border-color: #d58512;
}
.button-danger {
    background-color: #d9534f;
    border-color: #d9534f;
}
.button-danger:hover,
.button-danger:focus {
    background-color: #ac2925;
    border-color: #ac2925;
}

.btn {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    font-size: 2.2rem;
    vertical-align: middle;
    cursor: pointer;
}


/**
 * Panel styles
 */
.panel {
    margin-bottom: 2rem;
    border: 0.1rem solid transparent;
    border-radius: 0.4rem;
    box-shadow: 0 0.1rem 0.1rem rgba(0, 0, 0, 0.05);
}
.panel-default {
    border-color: #d1d1d1;
}
.panel-heading {
    padding: 1rem 1.5rem;
    border-bottom: 0.1rem solid transparent;
    border-top-left-radius: 0.4rem;
    border-top-right-radius: 0.4rem;
}
.panel-default > .panel-heading {
    background-color: #e7e7e7;
    border-color: #d1d1d1;
}
.panel-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.6rem;
    font-weight: bold;
}
.panel-title > .icon {
    margin-right: 0.2rem;
}
.panel-title > .toggle {
    opacity: 0.2;
    vertical-align: middle;
    margin-left: 0.5rem;
    cursor: pointer;
}
.panel-title > .toggle:hover {
    opacity: 0.9;
}
.panel-control {
    float: right;
}
.panel-body {
    padding: 1.5rem;
}


/**
 * Logging messages styles
 */
p.log {
    font-size: 1.3rem;
    margin-bottom: 0;
}
p.log span {
    margin-right: 0.8rem;
}
p.log.log-debug {
    color: inherit;
}
p.log.log-info {
    color: #398439;
}
p.log.log-warning {
    color: #d58512;
}
p.log.log-error,
p.log.log-critical {
    color: #ac2925;
}


/**
 * Horizontal rules
 */
hr {
    margin: 2rem 0;
    border-top-color: #9b4dca;
    border-top-width: 0.2rem;
}
hr.hr-condensed {
    margin: 1rem 0;
}
hr.hr-thin {
    border-top-width: 0.1rem;
}
hr.hr-thick {
    border-top-width: 0.3rem;
}
hr.hr-solid {
    border-top-style: solid;
}
hr.hr-dashed {
    border-top-style: dashed;
}
hr.hr-dotted {
    border-top-style: dotted;
}