/**
 * Button styles.
 */

button {
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    border: 1px solid transparent;
    border-color: rgba(0, 0, 0, 0.15);
    border-radius: 0.2em;
    -o-box-shadow: 0px 1px rgba(0, 0, 0, 0.333);
    -moz-box-shadow: 0px 1px rgba(0, 0, 0, 0.333);
    -webkit-box-shadow: 0px 1px rgba(0, 0, 0, 0.333);
    box-shadow: 0px 1px rgba(0, 0, 0, 0.333);
    background-color: #555;
    padding: 0.5em 1em;
    padding: 0.6em 1em;
    cursor: pointer;
}

button:active:focus,
button:active {
    -o-box-shadow: none;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    background-color: #193c59;
    border-color: transparent;
    position: relative;
    top: 1px;
}

button:focus {
    border-color: #193c59;
}

button:hover {
    text-decoration: underline;
}

button.methanal-waiting,
button.methanal-waiting:hover,
button.methanal-waiting:active {
    text-decoration: none;
    cursor: wait;
}

button.methanal-submit-disabled,
button.methanal-submit-disabled:hover,
button.methanal-submit-disabled:active {
    text-decoration: none;
    border-color: #ccc;
    background-color: transparent;
    color: #444;
    cursor: default;
    cursor: not-allowed;
    top: 0;
    opacity: 0.5;
    -o-box-shadow: none;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

/**
 * Option groups.
 */

optgroup {
    font-style: normal;
}

optgroup option {
    padding-left: 1em;
}

/**
 * LiveForm and controls.
 */

.methanal-liveform h1 {
    color: #000;
    font-weight: bold;
    margin: 0 0 0.5em 0;
    text-transform: uppercase;
    font-size: 130%;
    padding: 0.5em 0;
    border-bottom: 2px solid #ccc;
}

.methanal-liveform .modified-indicator {
    font-weight: bold;
}

.methanal-form-group {
    margin: 1em 0;
    border: none;
    border-top: 1px solid #ccc;
    padding: 1em;
    padding-top: 0;
}

.methanal-form-group legend {
    color: #c9000c;
    font-weight: bold;
    font-size: 120%;
}

.methanal-control {
    padding: 0.333em 0;
    clear: left;
}

.methanal-control-inputs,
.methanal-control-inputs > div {
    float: left;
}

.methanal-control-even {
    background-color: #f0f0f0;
    background-color: rgba(127, 127, 127, 0.08);
}

.methanal-caption {
    float: left;
    width: 20em;
    line-height: 1.75em;
    margin-right: 2em;
    margin-top: 0.2em;
    vertical-align: middle;
    text-align: right;
    font-weight: bold;
    color: #353535;
}

.methanal-multi-input,
.methanal-lookup-form {
    float: left;
    padding-left: 1em;
    border-left: 1px solid #b7b7b7;
}

.methanal-lookup-form .lookup-result {
    border-top: 2px solid #3580bf;
}

.methanal-simple-form .methanal-control-even {
    background-color: transparent;
}

.methanal-lookup-form .methanal-caption,
.methanal-multi-input .methanal-caption {
    width: 8em;
    margin-right: 0.533em;
}

.methanal-choice-group {
    border: solid #ddd;
    border-width: 0 0 0 1px;
    margin: 0.5em;
    padding: 0.3em 0 0.3em 0.5em;
}

.methanal-choice-group h4 {
    margin: 0 0 0.25em 0;
}

.dependancy-parent {
    border-left: 3px solid #777;
    margin-left: -3px;
}

.dependancy-child {
    border-left: 3px solid #bbb;
    margin-left: -3px;
}

input.methanal-input,
select.methanal-input,
textarea.methanal-input {
    float: left;
    background-color: #fff;
    background-image: url(/static/Methanal/images/icons/valid.png);
    background-repeat: no-repeat;
    background-position: 4px center;
    border: 1px solid #b7b7b7;
    padding: 0.333em 5px;
    padding-left: 22px;
    margin-right: 0.333em;
    -o-box-shadow: 0 1px #fff;
    -moz-box-shadow: 0 1px #fff;
    -webkit-box-shadow: 0 1px #fff;
    box-shadow: 0 1px #fff;
}

.methanal-check-input {
    border: none;
    margin-left: 0;
    float: left;
    cursor: pointer;
}

.methanal-check-input-label {
    float: left;
    margin-right: 0.5em;
    cursor: pointer;
    line-height: 1.75em;
}

select.methanal-input {
    padding-top: 0.233em;
    padding-bottom: 0.233em;
}

textarea.methanal-input,
select.methanal-multiselect {
    background-position: 4px 4px;
}

textarea.methanal-input {
    width: 20em;
    height: 10em;
}

.methanal-multiselect {
    max-height: 20em;
}

.methanal-multiselect-selection {
    font-size: 80%;
    clear: left;
    float: left;
    margin: 2px;
    font-weight: bold;
}

.methanal-control-error input.methanal-input,
.methanal-control-error select.methanal-input,
.methanal-control-error textarea.methanal-input {
    background-image: url(/static/Methanal/images/icons/invalid.png);
    border-color: #da2603;
}

.methanal-multi-input input {
    margin-left: 0;
}

.methanal-multi-input label,
.methanal-multi-input label input {
    cursor: pointer;
}

.friendly-representation {
    float: left;
    font-style: italic;
    vertical-align: middle;
    padding: 0.333em 5px;
    margin-left: -0.333em;
    margin-right: 0.333em;
    border: 1px solid #b7b7b7;
    border-left: none;
    background: #ddd;
    color: #333;
    -o-box-shadow: 0 1px #fff;
    -moz-box-shadow: 0 1px #fff;
    -webkit-box-shadow: 0 1px #fff;
    box-shadow: 0 1px #fff;
}

.embedded-label {
    color: #bbb !important;
}

/**
 * Table.
 */

.methanal-table table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
    background: transparent;
}

.methanal-table thead td {
    border-bottom: 2px solid #3580bf;
    color: #000;
    font-size: 90%;
    font-weight: bold;
    text-transform: uppercase;
    padding: 1em 0.35em;
}

.methanal-table a {
    display: block;
    margin: -0.3em;
    padding: 0.3em;
}

.methanal-table tbody tr:hover {
    background-color: #e8e8e8;
}

.methanal-table tr,
.methanal-table a {
    color: #333;
}

.methanal-table td {
    border-bottom: 1px solid #ddd;
    text-align: left;
    padding: 0.5em 0.3em;
}

.methanal-table .methanal-table-empty-row td {
    font-size: 90%;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
}

.methanal-table .table-action-icon {
    border: none;
    vertical-align: middle;
}

.methanal-table .even {
    background-color: #f5f5f5;
    background-color: rgba(0, 0, 0, 0.035);
}

/**
 * Filter list widget.
 */

.methanal-filter-list {
    margin: 0.5em;
    padding: 0.5em;
}

.methanal-filter-list .filter-results {
    margin-top: 1em;
}

/**
 * LiveForm actions.
 */

.methanal-action-container {
    margin-top: 0.5em;
}

.methanal-action-container .methanal-action-button {
    margin: 0;
    margin-right: 1em;
}

.methanal-action-button-submit {
    color: #fff;
    background-color: #3580bf;
}

/**
 * Modal dialog.
 */

.modal-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: #000;
    opacity: 0.75;
    z-index: 1000;
}

.modal-dialog-outer {
    z-index: 1001;
    display: table;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal-dialog-middle {
    display: table-cell;
    vertical-align: middle;
}

.modal-dialog-inner {
    display: table;
    margin: 5% auto;
    background: #fff;
    padding: 1em;
    -o-box-shadow: 0.5em 0.5em #aaa;
    -moz-box-shadow: 0.5em 0.5em #aaa;
    -webkit-box-shadow: 0.5em 0.5em #aaa;
    box-shadow: 0.5em 0.5em #aaa;
}

.modal-dialog-inner h1 {
    margin: 0;
    margin-bottom: 0.5em;
    padding: 0;
    font-weight: normal;
}

.modal-dialog-close {
    background: url(/static/Methanal/images/icons/close.png) no-repeat center center;
    float: right;
    width: 16px;
    height: 16px;
}

/**
 * Tab view.
 */

.methanal-tab-view {
    margin: 3em 0;
}

.methanal-tab-view .methanal-tab-view {
    margin: 1em 0;
}

.methanal-tab-view .methanal-tab-labels {
    margin: 0;
    padding: 0;
    padding-left: 1px;
    overflow: hidden;
}

.methanal-tab-view .methanal-tab-label {
    cursor: pointer;
    list-style: none;
    display: inline-block;
    padding: 0.75em 1.413em;
    border: 1px solid #ccc;
    margin-left: -1px;
    background: #e8e8e8;
}

.methanal-tab-view .methanal-tab-label-throbber {
    border: none;
    background: none
}

.methanal-tab-view .methanal-tab-label a {
    font-weight: bold;
    color: #404040;
}

.methanal-tab-view .methanal-tab-label a:hover {
    color: #247dc2;
    text-decoration: underline;
}

.methanal-tab-view .selected-tab-label {
    background: #fff;
    border-bottom: 1px solid transparent;
    border-top-color: #000;
}

.methanal-tab-view .selected-tab-label a {
    color: #000;
}

.methanal-tab-view .methanal-tab-content {
    background: #fff;
    border: 1px solid #ccc;
    display: none;
    padding: 1em;
    margin-top: -1px;
    -o-box-shadow: 2px 2px #eee;
    -moz-box-shadow: 2px 2px #eee;
    -webkit-box-shadow: 2px 2px #eee;
    box-shadow: 2px 2px #eee;
}

.methanal-tab-view .selected-tab {
    display: block;
}

.methanal-tab-view .methanal-tab-group {
    cursor: default;
    background: #f9f9f9;
    padding: 0 0.5em;
}

.methanal-tab-view .methanal-tab-group .methanal-tab-label {
    margin-bottom: -1px;
}

.methanal-tab-view .methanal-tab-group-label {
    font-size: 80%;
    text-align: center;
    padding: 0.5em;
    color: #000;
}

.methanal-tab-view .methanal-tab-group-tabs {
    margin: 0;
    padding: 0;
}

/**
 * Expander widget.
 */

.expander {
    background: #f3f3f3;
    border: 1px solid #ddd;
    border-color: #f5f5f5 #ddd #bbb;
    border-radius: 3px;
}

.expander-header-container {
    cursor: pointer;
}

.expander-header {
    background: #e7e7e7;
    vertical-align: middle;
    height: auto;
    padding: 0.5em;
}

.expanded .expander-header-label {
    background-image: url(/static/Methanal/images/collapse.png);
}

.expander-header-label {
    background: url(/static/Methanal/images/expand.png) no-repeat;
    line-height: 18px;
    font-size: 140%;
    padding-left: 25px;
}

.expander-content {
    padding: 1em;
    border-top: 1px solid #b7b7b7;
}

/**
 * Print media.
 */

@media print {
    body.printing > * {
        display: none;
    }

    body.printing .print-target {
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        font-size: 50%;
    }

    .print-target .modal-dialog-middle {
        display: block;
    }

    .print-target .modal-dialog-inner {
        display: block;
        max-width: 100%;
        margin: auto;
        -o-box-shadow: none;
        -moz-box-shadow: none;
        -webkit-box-shadow: none;
        box-shadow: none;
    }

    .print-target .no-print {
        display: none;
    }
}

/**
 * Hover tooltip.
 */

.hover-tooltip {
    display: inline-block;
    position: relative;
    border: 1px solid;
    -o-box-shadow: 1px 1px black;
    -moz-box-shadow: 1px 1px black;
    -webkit-box-shadow: 1px 1px black;
    box-shadow: 1px 1px black;
    color: #fff;
    font-size: 90%;
    padding: 0.25em;
    margin-right: 0.5em;
}

.hover-tooltip,
.hover-tooltip-arrow {
    border-style: solid;
    border-color: #6094a4;
    background: #6094a4;
}

.hover-tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-bottom-width: 0;
    background: none;
}

.error-tooltip .hover-tooltip,
.error-tooltip .hover-tooltip-arrow {
    border-color: #8d0e1b;
}

/** Tooltip bottom orientation. */

.hover-tooltip-bottom {
    left: -3em;
    margin-top: -1.5em;
}

.hover-tooltip-bottom .hover-tooltip-arrow {
    bottom: -0.7em;
    right: auto;
    left: 1.5em;
    border-left: 0.7em solid transparent;
    border-right: 0.7em solid transparent;
    border-top-width: 0.7em;
    border-bottom-width: 0;
    margin-left: -0.7em;
}

/** Tooltip left orientation. */

.hover-tooltip-left {
    left: 0.25em;
    margin-top: -0.25em;
}

.hover-tooltip-left .hover-tooltip-arrow {
    left: 0;
    top: 0.8em;
    bottom: auto;
    margin-top: -0.6em;
    border-top: 0.6em solid transparent;
    border-bottom: 0.6em solid transparent;
    border-right-width: 1em;
    border-left-width: 0;
    margin-left: -0.9em;
}

/** Tooltip top orientation. */

.hover-tooltip-top .hover-tooltip-arrow {
    top: -0.7em;
    right: auto;
    left: 1.5em;
    border-left: 0.7em solid transparent;
    border-right: 0.7em solid transparent;
    border-bottom-width: 0.7em;
    border-top-width: 0;
    margin-left: -0.7em;
}

/** Error hover tooltip. */

.error-tooltip .hover-tooltip,
.submission-error-tooltip .hover-tooltip {
    background-repeat: no-repeat;
    background-position: 0.25em center;
    padding-left: 0.5em;
}

.error-tooltip .hover-tooltip {
    background-color: #8d0e1b;
    border-color: #8d0e1b;
    color: #fff;
}

/** TextInput hover tooltip. */

.label-tooltip .hover-tooltip {
    position: absolute;
    left: inherit;
    margin-left: -3em;
    margin-top: -2em;
}

/** LiveForm submission error tooltip. */

.submission-error-tooltip .hover-tooltip {
    margin-top: 0.5em;
}

.submission-error-tooltip h2 {
    margin: 0.25em 0;
    font-weight: normal;
    font-style: normal;
    cursor: pointer;
}

.submission-error-tooltip p {
    font-size: 110%;
    margin: 0.5em 0;
}

/** LiveForm validation error tooltip. */

.form-validation-error-tooltip .hover-tooltip {
    max-width: 25%;
}

.form-validation-error-tooltip a:link,
.form-validation-error-tooltip a:visited {
    padding: 0 0.3em;
    color: #fee34d;
    text-decoration: underline;
}

.form-validation-error-tooltip a:hover {
    background: #a94a54;
}

.form-validation-error-tooltip h2 {
    cursor: default;
}

/**
 * Utility.
 */

.hidden {
    display: none !important;
}

.throbber {
    vertical-align: middle;
}

.placeholder {
    height: 32px;
    background: url(/static/Methanal/images/long-throbber.gif) no-repeat center center;
    padding: 1em 0;
}

.terminator {
    clear: both;
}
