:root {
    --logo-color: #44623F;
    --logo-color-lighter: #52764C;
    --logo-color-darker: #364E32;
    --text-color: #000000;

    --link-color: rgb(0, 123, 194);
    --link-hover-color: rgb(0, 0, 0);
    --link-hover-background-color: rgb(214, 214, 214);

    --border-dashed: 1px dashed #000000;

    --person-color: #c3f6f6;
}

body {
    padding: 0;
    margin: 0;
    
    font-family: 'Arial', sans-serif;
    color: var(--text-color);
    font-size: 14px;
}

#flexContainer {
    display: flex;
    flex-wrap: nowrap;
    /*justify-content: space-between;*/
    /*height: 100vh;*/
}

/* ------------------------------------------------------------------------------------------------------------------------- */
/* Barebones layout styles */

/* ----------------------------------------------------------------- */
/* Header */

#barebonesLogoSection {
    display: flex;
    align-items: center;

    margin-left: auto;
    margin-right: auto;
    /*margin-top: 1rem;*/
    margin-bottom: 0.5rem;

    padding: 0.5rem;

    border-bottom: 1px solid #000000;
}

#barebonesLogoSection span.productName {
    margin-left: 1rem;
}

/* ----------------------------------------------------------------- */
/* Page layout */

.barebonesContainer {

}

.standaloneForm {
    max-width: 25%;

    padding: 1rem;

    margin-top: 5rem;
    margin-bottom: 5rem;
    margin-left: auto;
    margin-right: auto;

    border: 1px solid #000000;
}

.standaloneForm table {
    width: 100%;
}

/* ------------------------------------------------------------------------------------------------------------------------- */
/* Two column layout styles */

#navigation {
    max-width: 15vw; /*25*/
    flex-shrink: 0;

    padding: 1rem;
    min-height: 100vh;
    
    border-right: 2px solid rgb(123, 123, 123);
}

#navigation h1, 
#navigation h2, 
#navigation h3, 
#navigation h4, 
#navigation h5, 
#navigation h6 {
    margin: 0;
}
#navigation h2, 
#navigation h3 {
    margin-top: 1rem;
}
#navigation h2 + h3 {
    margin-top: 0.25rem;
    margin-bottom: 0;
}

#navigation a {
    display: block;
}
#navigation a:hover {
    background-color: var(--link-hover-background-color);
}
#navigation a.standalone {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
#navigation a:not(#logoSection a) {
    padding-bottom: 0.25rem;
    text-decoration: none;
}
#navigation a:not(#logoSection a):not(.dottedLineNumber) {
    /* Indent wrapped text, if any, to improve readability */
    padding-left: 1rem; /* Indent all link text */
    text-indent: -1rem; /* Remove the indent for the first line of link text */
}
#navigation .dottedLineNumber {
    display: flex;
}

/* ----------------------------------------------------------------- */

#logoSection {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

#logoSection a {
    flex-grow: 1;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
}

#logoSection a:hover {
    background-color: var(--link-hover-background-color);
}

#logoSection a img {
    
}

#logoSection a span.productName {
    flex-grow: 1;
    margin-left: 1rem;
}

#logoSection .hamburgerMenu {
    display: none; /* Hidden unless/until overridden by a media query */
    margin-left: 1rem;
    cursor: pointer;
}

/* ----------------------------------------------------------------- */

.hamburgerMenu div {
    width: 35px;
    height: 5px;
    background-color: #000000;
    margin: 6px 0;
}

#userSection {

}

#linkMySettings {
    margin-top: 0.5rem;
}

#logoutSection {
    margin-top: 0.5rem;
}

#rightSide {
    width: 80vw;

    flex-grow: 1;
    padding: 1rem;
}

/* ----------------------------------------------------------------- */
/* Search */

#searchSection {
    display: flex;
    padding-bottom: 1rem;
    gap: 0.5rem;

    border-bottom: 1px solid #000000;
}

#searchContainer {
    /*display: inline-flex;
    align-items: start;*/
    flex-grow: 1;
}

#searchContainer input[type="text"] {
    /*flex-grow: 1;*/
    width: 100%;
    margin-bottom: 0;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    box-sizing: border-box;
    width: 100%;
    z-index: 1;

    background-color: #f9f9f9;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content div a {
    display: flex;
    
    padding: 1rem;
    text-decoration: none;
    gap: 2rem;
}
.dropdown-content div a:hover {
    background-color: var(--link-hover-background-color);
}
.dropdown-content .resultHeadingsContainer {
    flex-grow: 1;
    overflow: clip;
}
.dropdown-content .resultSubheading {
    color: #000000;
    font-size: 0.75rem;
    margin-left: 0.75rem;
}
.dropdown-content div a span.type {
    font-size: 0.75rem;
    color: var(--text-color);
}
.dropdown-content div.searchResultContainer {
    border-bottom: 1px solid #ccc;
}
.dropdown-content.showResults {
    display: block;
}

.standaloneResult {
    position: static;
    box-shadow: none;
}
.standaloneResult div.searchResultContainer {
    border: 1px solid #ccc;
}

.searchResultAssetAssignedTo {
    font-weight: bold;
    color: #FF0000 !important;
}

/* ----------------------------------------------------------------- */

#content {
    margin-bottom: 0.5rem;
}

#content table {
    width: 100%;
}

input, select, textarea:not(td textarea) {
    margin-bottom: 0.5rem;
    box-sizing: border-box;
}

.column {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

a, a:visited {
    color: var(--link-color);
}
a:hover {
    color: var(--link-hover-color);
}

form {
    margin-bottom: 0;
}

.section {
    margin-top: 1rem;
}

.tableContainer {
    overflow-x: auto;
}

.pageHeader, .pageFooter, .tableHeader, .tableFooter {
    display: flex;
    align-items: center;
    margin-top: 0.75rem;
}

.pageHeader {
    padding-bottom: 0.5rem;
    border-bottom: var(--border-dashed);
    margin-bottom: 1rem;
}
.tableHeader {
    justify-content: right;
    margin-bottom: 0.25rem;
}

.pageHeader .heading, .tableHeader .heading, .subHeading {
    flex-grow: 1;
    margin-right: 1rem;
    font-weight: bold;
}
.pageHeader .heading {
    font-size: 2rem;
}
.tableHeader .heading {
    font-size: 1.5rem;
}
.tableHeader .subHeading {
    font-size: 1.25rem;
}

.pageFooter {

}
.tableFooter {
    justify-content: right;
    margin-bottom: 0.25rem;
}

/*.pageHeader h1, .tableHeader h1 {
    flex-grow: 1;
    margin: 0;
    margin-right: 1rem;
    display: inline-block;
}*/

table {
    border-collapse: collapse;

    /*border: 1px solid black;*/
}

th, td {
    padding: 0.25rem;
}

th {
    font-weight: bold;
    text-align: left;
    text-wrap: nowrap;

    color: #FFFFFF; /* #000000 */
    background-color: var(--logo-color); /* #A1A1A1 */
    border: 1px solid #000000;
}

th.sortable {
    cursor: pointer;
}
td.clickable {
    cursor: pointer;
    text-decoration: underline;
    color: #000000;
}
th.sortable:hover, td.clickable:hover {
    color: #000000;
    background-color: rgb(230, 230, 230);
}
th div.headerGroup {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

td {
    /*background-color: #bcd1d1;*/
    background-color: #f2f2f2; /*#c1dbbd*/
    border: 1px solid #b3b3b3;
}

td a {
    text-decoration: none;
}

td input[type="text"], td input[type="password"], td select, td input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
}
td input[type="checkbox"] {
    box-sizing: border-box;
    margin-bottom: 0;
}

td.fullWidth {
    width: 100%;
}

/* ------------------------------------ */
/* Standalone form tables */

td.headerLeftSide {
    text-wrap: nowrap;
    padding-right: 0.5rem;
    min-width: 15%;
}

td.cellRightSide {
    width: 100%;
}

/* Replaces above styles going forward */
table.form td:first-child {
    text-wrap: nowrap;
    padding-right: 0.5rem;
    min-width: 15%;
}
table.form td {
    text-align: left;
}

table.form th.grow, table.form td.grow {
    width: 100%;
}

/* ------------------------------------ */

tr:nth-child(even) td {
    background-color: #e6e6e6;
}

.sortSpan {
    float: right;
    user-select: none;
}

.dottedLine {
    flex-grow: 2;
    border-bottom: 1.5px dotted #000;
    margin-right: 2px;
    margin-left: 2px;
}

.alertText {
    text-decoration: none;
    color: rgb(194, 0, 0);
    font-weight: bold;
}

.warningText {
    text-decoration: none;
    color: rgb(255, 176, 1);
    font-weight: bold;
}

.infoText {
    /*display: inline-block;
    margin-left: 0.35rem;
    float: right;*/
    text-decoration: none;
    color: rgb(0, 0, 0);
    font-weight: bold;
}

hr {
    margin-top: 1rem;
    margin-bottom: 1rem;

    border: 0;
    border-bottom: var(--border-dashed);
}

option.selected {
    font-weight: bold;
}

.hide {
    display: none !important;
}
.show {
    display: contents !important;
}

.person {

}

.peopleType {

}

/*-----*/

.label {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
    padding: 0.25rem;
    border-radius: 0.25rem;
    font-weight: bold;
    border: 1px solid #c0c0c0;
    text-wrap: nowrap;
    text-align: center;
    color: var(--text-color);
    display: inline-block;
}
.overdue {
    background-color: rgba(104, 1, 255, 0.25) !important;
}
.overdueText {
    color: rgba(104, 1, 255, 1) !important;
}
.missing {
    /*background-image: linear-gradient(45deg, rgba(200, 0, 0, 0.25) 25%, transparent 25%, transparent 50%, rgba(200, 0, 0, 0.25) 50%, rgba(200, 0, 0, 0.25) 75%, transparent 75%, transparent);*/
    background-size: 24px 24px;
    background-color: #ff6e6e !important;
}
.needsRepair {
    /*background-image: linear-gradient(135deg, rgba(255, 176, 1, 0.25) 25%, transparent 25%, transparent 50%, rgba(255, 176, 1, 0.25) 50%, rgba(255, 176, 1, 0.25) 75%, transparent 75%, transparent);*/
    background-size: 24px 24px;
    background-color: #ffd451 !important;
}
.disabled {
    background-color: #000 !important;
    color: #fff;
}
.retired {
    background-color: rgb(161, 161, 161) !important;
}

/*-----*/

.code {
    font-family: Consolas, monospace;
    font-size: 1rem;
}

.simpleForm {
    background-color: #fff3dc;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #bfb091;
}
.simpleForm h2:first-of-type {
    margin-top: 0;
}
.simpleForm input:not(input[type="checkbox"]), .simpleForm textarea {
    width: 100%;
}
.simpleForm .buttonsContainer { /* Same for modals */
    display: flex;
    justify-content: right;
}

.textAlignRight {
    text-align: right !important;
}

.clickable {
    cursor: pointer;
}

.warningBox {
    background-color: #fff111;
    padding: 1rem;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    text-align: center;
}

.strikedOut {
    text-decoration: line-through;
}

/* --------------------------------------------------------------------------------------*/
/* Tooltips */
/* Based off https://www.w3schools.com/css/css_tooltip.asp */

/* Container */
.tooltipContainer {
    position: relative;
    display: inline-block;
}

/* Popup */
.tooltipPopup {
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    text-align: center;
    padding: 0.25rem;
    border-radius: 0.25rem;

    /* Position the tooltip text - see examples below! */
    position: absolute;
    z-index: 1;

    /* Right side */
    top: 0;
    left: calc(100% + 0.5rem);
}

.visible {
    visibility: visible;
}
/* --------------------------------------------------------------------------------------*/

.required {
    color: #FF0000;
}

.inputError {
    border: 2px solid #ff1010;
}

.errorBox {
    padding: 1em;

    background-color: #ff3f3f;
    border: 1px solid #000000;
}

.errorBackground {
    background-color: #ff6f6f !important; /*red*/
}

.warningBackground {
    background-color: #ffe26f !important; /*yellow*/
}

.changeBackground {
    background-color: #6fc9ff !important; /*blue*/
}

.createdBackground {
    background-color: #6fff6f !important; /*green*/
}

.validationError {
    padding: 0.25rem;
}
.errorsClass {
    padding: 0;
}
.validationChangesOldNew {
    margin-left: 1rem;
}

/* -------------------------------------------------- */
/* MODALS */

:modal {
    background-color: beige;
    border: 2px solid burlywood;
    border-radius: 5px;
}

dialog button:not(dialog button:last-of-type) {
    margin-right: 0.25rem;
}

dialog .buttonsContainer {
    display: flex;
    justify-content: right;
    margin-top: 1rem;
}

/* -------------------- */
/* Label Chooser */

#labelChoices {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

a.buttonLabelChoose {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 0.5rem;

    color: var(--text-color);
    text-decoration: none;
}
a.buttonLabelChoose:hover {
    background-color: #CCCCCC !important;
}
a.buttonLabelChoose.selected {
    background-color: #BBBBBB;
}

/* -------------------------------------------------- */

.dismiss {
    text-align: center;
}

.feedbackButton, .helpButton {
    margin-left: 1rem;
}

.assetLabels {

}

.noWrap {
    text-wrap: nowrap;
}

.keepWhiteSpace {
    white-space: pre-line;
}

/* -------------------------------------------------- */
/* Locations */

.locationContainer:not(.locationContainer:last-of-type) {
    margin-bottom: 0.125rem;
}

.locationContainer .location {
    display: flex;
    gap: 1rem;
    padding: 0.125rem;
    align-items: center;
}
.locationContainer .location:hover {
    background-color: var(--link-hover-background-color);
}
.locationContainer .location.selected {
    background-color: #fff;
    border: 2px solid #000;
}

.locationContainer .sublocations {
    margin-top: 0.125rem;
    margin-left: 3rem;
}

.locationContainer .showHide {
    min-width: 2rem;
}

.locationContainer .name {
    flex-grow: 1;
}

.locationContainer .actions {

}

.locationContainer .actions button:not(.actions button:last-of-type) {
    margin-right: 0.25rem;
}

/* -------------------------------------------------- */

/* ------------------------------------------------------------------------------------------------------------------------- */
/* MEDIA QUERIES */

/* Phones/iPad Mini in portrait mode */
@media only screen and (max-width: 768px) {
    #flexContainer {
        height: auto;
        flex-wrap: wrap;
        padding: 0.5rem;
    }

    th {
        text-wrap: nowrap;
    }

    /* ----------------------------------------------------------------- */
    /* Two column layout styles */

    /* Widen the menu */
    #navigation {
        flex-basis: 100%;

        /*margin-left: 0.5rem;
        margin-right: 0.5rem;
        margin-top: 0.5rem;
        margin-bottom: 0;*/

        padding: 0;

        border-right: none;
        border-bottom: 1px solid #000;

        min-height: auto;
        max-width: none;
    }

    /* Show the hamburger menu "button" */
    #logoSection .hamburgerMenu {
        display: inline-block;
    }

    /* Hide the main app links */
    #nonLogoSections {
        display: none;
    }

    /* Widen the content */
    #rightSide {
        flex-basis: 100%;

        /*margin-left: 0.5rem;
        margin-right: 0.5rem;
        margin-top: 0;*/

        padding: 0;

        overflow: scroll;
    }

    /*#search {
        display: none;
    }*/

    #searchSection {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    #searchSection button {
        display: none;
    }

    #searchContainer {
        align-items: center;
        display: flex;
    }

    #searchContainer input[type="text"] {
        height: 100%;
    }

    /* ----- */

    .assetDetails {
        max-width: none;
    }

    .assetLabels {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    /* ----------------------------------------------------------------- */
    /* Barebones layout styles */

    .standaloneForm {
        /* Negate existing styles */
        max-width: none;
        margin: 0;
        border: none;

        /* Add new styles */
        /*width: 100%;*/
    }
    
    /* ----------------------------------------------------------------- */
}

/* ------------------------------------------------------------------------------------------------------------------------- */