/* General styles */

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

strong {
    font-weight: bold;
}

h1 {
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 1em;
    font-size: 1.4rem;
}

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

a {color: #29538c;}

.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;
}

.top-message {
    position: fixed;
    top: 5px;
    left: 40%;
    display: block;
    text-align: center;
    width: 20%;
    margin-left: auto;
    margin-right: auto;
    height: 0px;
    overflow: hidden;
    transition: height 0.2s;
}

.top-message.visible {
    height: 3em;
}

.top-message span {
    display: inline-block;
    background-color: #d7ffce;
    padding: 0.6em 2.9em;
    border-radius: 7px;
    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.10);
}


/* 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%;
}

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,
textarea: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%;
}


/* Admin styles */

.nav {
    margin-top: 1em;
    margin-bottom: 1em;
}

.nav a {
    display: inline-block;
    padding-right: 0.8em;
}

.filter-settings {
    border: 1px solid #e4e4e4;
}

.filter-settings th {
    padding-left: 0.8em;
}

.filter-settings td:last-child {
    padding-right: 0.8em;
}

.filter-settings tr:first-child td,
.filter-settings tr:first-child th {
    padding-top: 0.8em;
}

.filter-settings tr:first-child th {
    padding-top: 1.2em;
}

.filter-settings tr:last-child td,
.filter-settings tr:last-child th {
    padding-bottom: 0.8em;
}

.list-view {
    margin-top: 1em;
    border-collapse: collapse;
}

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

.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: 137%;
}

.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;
}

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

.pager {
    margin-top: 1em;
    overflow: hidden;
}

.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: #f0f0f0;
}

.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;
}


/* Invoices page */

.invoice-page {
    max-width: 900px;
    border: 1px solid #dadada;
    box-sizing: border-box;
    padding: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    box-shadow: 0px 1px 13px #0000003b;
}

.invoice-page .top-section {
    display: table;
    width: 100%;
}

.invoice-page .top-section div {
    display: table-cell;
}

.invoice-page .top-section > div:nth-child(1) {
    vertical-align: middle;
    text-align: left;
    padding-left: 5px;
    width: 74px;
    box-sizing: border-box;
}

.invoice-page .top-section > div:nth-child(1) img {
    width: 3.05rem;
    padding-bottom: 0.1rem;
}

.invoice-page .top-section > div:nth-child(2) {
    vertical-align: bottom;
    text-align: left;
    padding-bottom: 0.4rem;
}

.invoice-page .top-section > div:nth-child(2) strong {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    display: block;
}

.invoice-page .top-section > div:nth-child(2) p {
    margin: 0;
    margin-bottom: 0.5rem;
}

.invoice-page .top-section > div:nth-child(2) em {
    font-style: italic;
    font-size: 0.8rem;
}

.invoice-page .top-section > div:nth-child(3) {
    text-align: right;
    vertical-align: bottom;
}

.invoice-page .top-section > div:nth-child(3) p {
    margin-top: 0.3em;
    margin-bottom: 0.3em;
    line-height: 150%;
    font-size: 0.8rem;
}

.invoice-page h2 {
    text-transform: uppercase;
    border-bottom: 1px solid #dadada;
    font-size: 1.5rem;
    font-weight: bold;
    padding-top: 1.8rem;
    padding-bottom: 0.3rem;
}

.invoice-page h3 {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.invoice-page .middle-section {
    display: table;
    width: 100%;
}

.invoice-page .middle-section div {
    display: table-cell;
    padding-top: 1.1rem;
    vertical-align: top;
    padding-bottom: 1.8rem;
}

.invoice-page .middle-section div:nth-child(1) {
    text-align: left;
    width: 68%;
}

.invoice-page .middle-section div:nth-child(1) textarea {
    width: 30em;
    height: 4.8em;
    resize: none;
}

.invoice-page .middle-section div:nth-child(2) {
}

.misc-table {
    width: 100%;
}

.misc-table tr {
}

.misc-table th {
    text-align: left;
    padding-right: 1em;
}

.misc-table td {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

.misc-table td input {
    width: 100%;
}

.invoice-page .items-table {
    width: 100%;
}

.invoice-page .items-table tr {page-break-inside: avoid;}

.invoice-page .items-table tr.section-row td:nth-child(2) .editable-div {
    font-weight: bold;
}

.invoice-page .items-table th {
    text-align: center;
    font-weight: bold;
    line-height: 200%;
    background-color: #666;
    color: white;
}

.invoice-page .items-table td {
    border-bottom: 1px solid #dadada;
    vertical-align: top;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}

.invoice-page .items-table .section-row td {
    background-color: whitesmoke;
    border-bottom: 1px solid #666;
}

.invoice-page .items-table .before-section-row td {
    border-bottom: 1px solid #666;
}

.invoice-page .items-table td input,
.invoice-page .items-table td .editable-div {
    width: 100%;
    border-radius: 0;
    border: none;
    text-align: center;
    padding-left: 0.8em;
    padding-right: 0.8em;
    line-height: 150%;
}

.invoice-page .items-table .section-row input {
    background-color: transparent;
}

.invoice-page .items-table td:nth-child(1) {
    width: 15%;
}

.invoice-page .items-table td:nth-child(2) {
}

.invoice-page .items-table td:nth-child(2) .editable-div {
    text-align: left;
}

.invoice-page .items-table td:nth-child(3) {
    width: 12%;
}

.invoice-page .items-table td:nth-child(4) {
    width: 12%;
    text-align: center;
    line-height: 178%;
    color: #666;
}

.invoice-page .items-table .section-row td:nth-child(4) {
    font-weight: bold;
    vertical-align: bottom;
}

.invoice-page .items-table td:nth-child(5) {
    width: 12%;
    text-align: center;
    vertical-align: middle;
}

.invoice-page .items-table td:nth-child(5) i {
    cursor: pointer;
    padding-left: 0.1em;
    padding-right: 0.1em;
    font-size: 1.4rem;
}

.invoice-page .items-table .last-data-row td:nth-child(5) i {
    display: none
}


.invoice-page .items-table .bottom-row td {
    line-height: 200%;
    text-align: center;
    border: none;
}

.invoice-page .items-table .dragging td,
.invoice-page .items-table .dragging input {
    background-color: #eee;
}

.invoice-page .items-table .bottom-row td:nth-child(1) {
}

.invoice-page .items-table .bottom-row td:nth-child(2) {
}

.invoice-page .items-table .bottom-row td:nth-child(3) {
    /* border-bottom: 1px solid #dadada; */
    font-weight: bold;
    color: #666;
}

.invoice-page .items-table .bottom-row td:nth-child(4) {
    /* border-bottom: 1px solid #dadada; */
    font-weight: bold;
}

.editable-div {
    line-height: 150%;
    border: 1px solid #dadada;
    color: #666;
    padding-left: 0.3em;
    padding-right: 0.3em;
    box-sizing: border-box;
    padding-top: 0.14em;
    padding-bottom: 0.14em;
}

/* Time tracking */

p.buttons {
    vertical-align: middle;
}

p.buttons select {
    vertical-align: middle;
}

.time-table {
    width: 95%;
    max-width: 66em;
}

.time-table tr td {
    white-space: nowrap;
    vertical-align: middle;
}

.time-table tr td:nth-child(1) {
    white-space: normal;
}

.time-table tr.time-edit-row td:nth-child(1) {
    white-space: nowrap;
}

.time-table tr td:nth-child(2) {
    width: 5.8em;
}

.time-table tr td:nth-child(3) {
    width: 5.8em;
}

.time-table tr td:nth-child(4) {
    width: 3.8em;
}

.time-table tr td:nth-child(5) {
    width: 8.2em;
    text-align: center;
}

.time-table tr td:nth-child(5) i {
    color: #717171;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.25em;
    margin-right: 0.25em;
    cursor: pointer;
}

.time-edit-row > td {
    white-space: nowrap;
}

.time-edit-row td .description-field {
    min-width: 20em;
    max-width: 77%;
    white-space: normal;
    display: inline-block;
    border: 1px solid #ccc;
    line-height: 143%;
    vertical-align: middle;
}

.time-edit-row td input[type=text] {
    border-radius: 0;
}

.time-edit-row td .start-date-field,
.time-edit-row td .end-date-field {
    width: 7.5em;
    vertical-align: middle;
}

.time-edit-row td .start-time-field,
.time-edit-row td .end-time-field {
    width: 5.5em;
}

.time-edit-row td .hours-field {
    width: 5em;
}

.list-view tr.day-heading > td {
    border-top: none;
    background-color: #637894;
    color: white;
}

.list-view tr.day-heading > td:nth-child(1) {
    font-size: 1.1rem;
    padding-top: 0.6rem;
    padding-left: 0.3rem;
}

.list-view tr.day-heading > td:nth-child(2) {
    font-style: italic;
    vertical-align: bottom;
    padding-bottom: 0.1rem;
}

#TotalHours {
    font-style: italic;
    color: #666;
}


/* Task list */

.task-area {
    font-size: 14px;
}

.task-area.full-page {
    font-size: 18px;
}

@media screen and (min-width: 600px) {
    .task-area.full-page {
        font-size: 14px;
    }
}

.task-list {
    width: 100%;
    max-width: 21em;
}

@media screen and (min-width: 600px) {
    .task-list {
        width: auto;
    }
}

.task-row {
}

.task-row > td {
    vertical-align: top;
    padding-bottom: 0em;
}

.task-row.dragging > td,
.task-row.dragging .name-field {
    background-color: #eee;
}

.task-row > td:nth-child(1) {
    padding-right: 0.5em;
}

.task-row > td:nth-child(2) {
    padding-right: 0.5em;
}

.task-row > td:nth-child(3) {
}

.task-row .name-field {
    border: none;
    color: black;
    resize: none;
    width: 100%;
    line-height: 135%;
}

@media screen and (min-width: 600px) {
    .task-row .name-field {
        width: auto;
        min-width: 20em;
        margin-top: 0.15em;
    }
}

.task-row.complete .name-field {
    text-decoration: line-through;
}

.task-row a {
    color: black;
    display: inline-block;
}

.task-row i {
    cursor: pointer;
    display: inline-block;
    padding-top: 0.05em;
}

p.button-row {
    vertical-align: middle;
}

p.button-row input {vertical-align: middle;}

p.button-row i {
    cursor: pointer;
    vertical-align: middle;
    margin-left: 0.6em;
}


/* Notes */

.note-buttons {
    margin-top: -0.4em;
    margin-bottom: 0.7em;
}

.note-buttons input {
    margin-right: 0.4em;
}

.note-list {
    max-width: 400px;
}

.note-list a {
    display: block;
    padding: 0.5em;
    margin-bottom: 0.5em;
    text-decoration: none;
    color: #666;
    vertical-align: middle;
    border: 1px solid #eee;
    background-color: #fff;
    transition: background-color 0.05s;
}

.note-list a:first-child {
}

.note-list a:hover {
    background-color: #f6f6f6;
}

.note-list i {
    vertical-align: middle;
    display: inline-block;
    margin-right: 0.4em;
}

#TxtNote {
    border: none;
    width: 95%;
    display: block;
    position: fixed;
    top: 4em;
    bottom: 0.5em;
    resize: none;
    font-family: monospace;
    font-size: 0.875rem;
    height: 90%;
}


/* Auto-classes: recipelist */

.auto-recipelist {column-count: auto;column-width: 18em;column-gap: 0.5rem;}

.recipelist01 {
    display: block;
    text-decoration: none;
    text-align: left;
    line-height: 270%;
    background-color: whitesmoke;
    color: black;
    margin-bottom: 0.4em;
    padding-left: 1em;
    padding-right: 1em;
    border-radius: 5px;
}


/* Auto-classes: recipe */

.auto-recipe {
    white-space: pre-line;
    line-height: 150%;
}


/* Print styles */

@media print {
    body {
        font-size: 12px;
    }

    .nav,
    #EditView > h1,
    #EditView > p,
    .status-line,
    .top-message,
    .invoice-page .items-table .last-data-row {
        display: none;
    }

    .invoice-page {
        border: none;
        padding: 0;
        box-shadow: none;
    }

    .invoice-page .items-table th:nth-child(5),
    .invoice-page .items-table td:nth-child(5) {
        display: none;
    }

    .invoice-page .items-table td input, 
    .invoice-page .items-table td .editable-div {
        background-color: transparent;
    }

    input, textarea {
        border: none;
        padding-top: 0.2em;
        padding-left: 0;
        padding-bottom: 0;
        line-height: 180%;
    }

    .misc-table th,
    .misc-table td {
        padding-top: 0.0rem;
        padding-bottom: 0.0rem;
        vertical-align: middle;
    }

    .invoice-page .middle-section div {
        padding-bottom: 1.0em;
    }

}
