a {
    color: #415465;
    text-decoration: underline;
}

body {
    background-color: rgb(248, 245, 226);
    color: #393939;
    font-family: 'Raleway', 'Arial', sans-serif;
    font-size: 16px;
}

button {
    margin-left: 3em;
    padding: 1.1em;
    font-size: 16px;
}

h1 {
    color: rgb(65, 84, 101);
}

input {
    padding: 1em;
    font-size: 16px;
}

label {
    display: none;
    flex-grow: 0;
}

select {
    flex-basis: calc(50% + 2em);
    font-size: 16px;
    height: 3em;
    margin-top: 0.25em;
    flex-grow: 0;
    min-width: 200px;

}

#addresses, #charges, #head, #notes, #results, #terms, #workorder {
    margin: 2em 0;
}

#addresses, #head, #workorder {
    display: flex;
}

#checkHelp {
    display: none;
}

#checkHelp img {
    max-width: 100%;
}

#notes {
    border: 1px solid #c0c0c0;
    padding: 0.5em;
}

#paymentForm {
    display: none;
    float: right;
    font-size: 16px;
    max-width: 400px;
}

#searchForm {
    display: flex;
    width: 100%;
}

#searchForm .form-element {
    flex-grow: 1;
}

#searchTerm {
    width: 100%;
}

#successMessage {
    float: right;
    max-width: 400px;
}

#wrapper {
    margin: 0 auto;
    max-width: 1024px;
}

.address, #invoice-number, #logo {
    flex-basis: 50%;
}

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

.align-left, .input-wrapper.align-left {
    text-align: left;
}

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

.error, .backEndError {
    color: red;
    font-weight: normal;
    text-align: left;
}

#overlay {
    height: 100%;
    width: 100%;
    position: fixed;
    z-index: 10;
    top: 0;
    left: 0;
}

#paymentForm .card-number-wrapper {
    margin-bottom: 1em;
}

#paymentForm .card-js .icon {
    top: 17px;
}

#paymentForm .card-js .card-type-icon {
    top: 13px;
}

#paymentForm .card-js input {
    color: #393939;
    font-size: 16px;
    padding: 1em 1em 1em 2em;
    height: auto;
}

.emphasis {
    font-weight: bold;
}

#paymentAmount {
    text-align: right;
}

.input-wrapper {
    max-width: 400px;
    margin-bottom: 1em;
    text-align: right;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.input-wrapper input {
    flex-basis: 50%;
    flex-grow: 0;
    min-width: 200px;
}

.input-wrapper label {
    font-weight: bold;
    flex-grow: 0;
    margin: 1.1em 1em 0 0;
    flex-basis: 35%;
}

.input-wrapper label.error {
    flex-basis: 100%;
    height: 1em;
}

.table {
    width: 100%;
    display: table;
    margin-top: 1em;
}

.table-cell {
    display: table-cell;
    padding: 0.25em;
    border: 1px solid #c0c0c0;
}

.table-cell-5 {
    width: 5%;
}

.table-cell-10 {
    width: 10%;
}

.table-cell-15 {
    width: 15%;
}

.table-cell-20 {
    width: 20%;
}

.table-cell-25 {
    width: 25%;
}

.table-cell-30 {
    width: 30%;
}

.table-cell-40 {
    width: 40%;
}

.table-cell-70 {
    width: 70%;
}

.no-border, .table-cell.no-border {
    border: none;
}

.table-header, .table-cell.dark {
    color: white;
    background-color: #808080;
}

.table-header .table-cell {
    text-align: center;
}

.table-row, .table-header {
    display: table-row;
}

#charges .table-row .table-cell {
    padding-bottom: 1em;
}

.workorder-info {
    flex-basis: 50%;
    padding-right: 1em;
}

#charges .table-row:last-child .table-cell {
    padding-bottom: 2em;
}

#charges .table-row .table-cell.no-padding {
    padding: 0.25em;
}

#paymentForm label {
    display: block;
    margin-bottom: 0.5em;
}

.payment-button {
    float: right;
    display: inline-block;
    margin-bottom: 1em;
}

@media all and (max-width: 1050px) {
    #wrapper {
        margin: 0 2em;
    }
}

@media all and (max-width: 400px) {
    #workorder, #addresses {
        flex-wrap: wrap;
    }

    .workorder-info, #billing-address, #contractor-address {
        flex-basis: 100%;
        margin-bottom: 1em;
    }

    .input-wrapper label, input-wrapper input, input-wrapper select {
        flex-basis: 100%;
    }
}

/** Throbber **/

#throbber-wrapper {
    width: 64px;
    height: 54px;
    min-width: 64px;
}

#throbber {
    margin: .5em 0 0 1em;
    width: 32px;
    height: 32px;
}

.sk-folding-cube {
    margin: 20px auto;
    width: 40px;
    height: 40px;
    position: relative;
    -webkit-transform: rotateZ(45deg);
    transform: rotateZ(45deg);
}

.sk-folding-cube .sk-cube {
    float: left;
    width: 50%;
    height: 50%;
    position: relative;
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
}
.sk-folding-cube .sk-cube:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(65, 84, 101);
    -webkit-animation: sk-foldCubeAngle 2.4s infinite linear both;
    animation: sk-foldCubeAngle 2.4s infinite linear both;
    -webkit-transform-origin: 100% 100%;
    transform-origin: 100% 100%;
}
.sk-folding-cube .sk-cube2 {
    -webkit-transform: scale(1.1) rotateZ(90deg);
    transform: scale(1.1) rotateZ(90deg);
}
.sk-folding-cube .sk-cube3 {
    -webkit-transform: scale(1.1) rotateZ(180deg);
    transform: scale(1.1) rotateZ(180deg);
}
.sk-folding-cube .sk-cube4 {
    -webkit-transform: scale(1.1) rotateZ(270deg);
    transform: scale(1.1) rotateZ(270deg);
}
.sk-folding-cube .sk-cube2:before {
    -webkit-animation-delay: 0.3s;
    animation-delay: 0.3s;
}
.sk-folding-cube .sk-cube3:before {
    -webkit-animation-delay: 0.6s;
    animation-delay: 0.6s;
}
.sk-folding-cube .sk-cube4:before {
    -webkit-animation-delay: 0.9s;
    animation-delay: 0.9s;
}
@-webkit-keyframes sk-foldCubeAngle {
    0%, 10% {
        -webkit-transform: perspective(140px) rotateX(-180deg);
        transform: perspective(140px) rotateX(-180deg);
        opacity: 0;
    } 25%, 75% {
          -webkit-transform: perspective(140px) rotateX(0deg);
          transform: perspective(140px) rotateX(0deg);
          opacity: 1;
      } 90%, 100% {
            -webkit-transform: perspective(140px) rotateY(180deg);
            transform: perspective(140px) rotateY(180deg);
            opacity: 0;
        }
}

@keyframes sk-foldCubeAngle {
    0%, 10% {
        -webkit-transform: perspective(140px) rotateX(-180deg);
        transform: perspective(140px) rotateX(-180deg);
        opacity: 0;
    } 25%, 75% {
          -webkit-transform: perspective(140px) rotateX(0deg);
          transform: perspective(140px) rotateX(0deg);
          opacity: 1;
      } 90%, 100% {
            -webkit-transform: perspective(140px) rotateY(180deg);
            transform: perspective(140px) rotateY(180deg);
            opacity: 0;
        }
}
