/* IMPORT FONTS */

@import url('https://fonts.googleapis.com/css2?family=Stack+Sans+Text:wght@200..700&&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* VARIBLES */

:root {
    --font: 'Inter', sans-serif;
    --altFont: 'Stack Sans Text', serif;
    --iconFont: 'Font Awesome 7 Free';
    --fontSize: 16px;
    --font-size-mobile: 14px;
    --lightColor: #4d7581;
    --midColor: #05495f;
    --darkColor: #033241;
    --borderRadius: 10px;
    --blue: #1b47ef;
    --gray: #666;
    --green: #0c734b;
    --orange: #cd6000;
    --purple: #801bef;
    --red: #b94444;
    --buttonPress: inset 0 0 10px 0 rgb(0 0 0 / 40%);
}

/* TEMPLATE */ 

* {
    outline: 0;
}

html {
    background: #1a1f23 url(/images/body_bkg.png) top center repeat;
    background-attachment: fixed;
    height: 100%;
}

body {
	color: #000;
    font-family: var(--font);
    font-size: var(--fontSize);
    height: 100%;
    line-height: 1.5em;
    margin: 0;

    &:has(dialog[open]) {
        overflow: hidden
    }
}

#header {
    padding: 5px 0 25px 0;

    #logo {
        margin: 25px 0 50px 0;
        text-align: center;

        img {
            margin: 0 auto;
            max-width: 100%;
            width: 300px;
        }
    }
}

nav#menu {
    background: var(--darkColor);
    border-radius: 5px;
    display: flex;
    font-family: var(--altFont);
    font-size: 17px;
    line-height: 1.2em;
    margin: 0 auto;
    width: fit-content;

    a {
        border-radius: 5px;
        color: #fff;
        font-weight: 600;
        padding: 10px 20px;
        text-decoration: none;

        &::before {
            content: attr(data-icon);
            font-family: var(--iconFont);
            margin-right: 7px;
        }

        &:hover {
            background: var(--midColor);
        }

        &:active {
            box-shadow: var(--buttonPress);
        }
    }
}

header#title {
    color: var(--darkColor);
    font-family: var(--altFont);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2em;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0px 1px 0 #fff;

    a {
        color: var(--darkColor);
        font-weight: 800;
    }
}

#main {
    margin: 0 auto;
    max-width: 1400px;
    padding: 0 10px;
}

h1,
h2 {
    color: var(--midColor);
    font-family: var(--altFont);
    font-weight: 700;
    line-height: 1.2em;
    margin: 0;
}

h1 {
    font-size: 21px;
    padding: 15px 0;
}

h2 {
    font-size: 16px;
    padding: 20px 0 10px 0;
}

img {
    border: 0;
}

footer {
    font-family: var(--altFont);
    font-size: 14px;
    font-weight: 600;
    padding: 30px 0;
    text-align: center;
    text-shadow: 0 1px 0 #fff;
}

#toTop {
    background: var(--midColor);
    border-radius: 10px 0 0 0;
    bottom: 0;
    box-shadow: 0 0 10px rgb(113 136 143 / 60%);
    color: #fff;
    cursor: pointer;
    font-size: 30px;
    font-weight: 600;
    line-height: 60px;
    position: fixed;
    right: 0;
    text-align: center;
    width: 60px;

    &::before {
        content: "\f062";
        font-family: var(--iconFont);
    }

    &:hover {
        background: var(--darkColor);
    }

    &:active {
        box-shadow: var(--buttonPress);
    }
}

/* PAGE WIDTH OVERRIDES */

body#page-login #main,
body#page-mfa #main,
body#page-forgot #main,
body#page-account #main {
    max-width: 500px;
}

.page {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgb(119 119 119 / 25%); 
    margin: 20px 0;
    padding: 40px;
    text-align: left;
}

hr {
    background: transparent;
    border: 0;
    border-bottom: 3px solid #d6e2e5;
    clear: both;
    height: 0;
    margin: 20px 0;
    padding: 0;
}

p {
    margin: 0;
    padding: 6px 0;
}

::selection {
    background: rgb(185 205 210);
}

.error {
    background: #c70606;
    border-radius: var(--borderRadius);
    color: #fff;
    font-size: 15px;
    line-height: 1.5em;
    margin: 15px 0;
    padding: 15px 20px;
    text-align: left;
}

/* AUDIT LIST */

.audit {
    background: #d7e0e2;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    font-family: var(--altFont);
    line-height: 1em;
    margin: 15px 0;
    row-gap: 9px;
    padding: 20px 30px;

    .auditTitle {
        font-size: 18px;
        padding-bottom: 4px;
    }

    .auditPeriod,
    .auditQuestions,
    .auditDate,
    .auditDue,
    .auditCompleted {
        color: var(--midColor);
        font-size: 16px;

        b {
            color: #000;
            font-feature-settings: "tnum";
            font-weight: 500;
            margin-left: 5px;
        }

        progress {
            accent-color: var(--lightColor);
            height: 12px;
            margin-left: 10px;
            vertical-align: baseline;
        }

        &::before {
            display: inline-block;
            font-family: var(--iconFont);
            font-weight: 600;
            margin-right: 10px;
            text-align: center;
            width: 18px;
        }
    }

    .auditPeriod::before {
        content: "\f073";
    }

    .auditQuestions::before {
        content: "\f0cb";
    }

    .auditDate::before {
        content: "\f08d";
    }

    .auditDue::before {
        content: "\f34e";
    }

    .auditCompleted::before {
        content: "\f560";
    }
}

/* TEXT STYLES */

a {
    color: #000fe1;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;

    &:hover {
        text-decoration: none;
    }

    &:active {
        color: #cb0094;
    }
}

.bold {
    font-weight: 700;
}

.blue {
    color: var(--blue);
}

.gray {
    color: var(--gray);
}

.green {
    color: var(--green);
}

.orange {
    color: var(--orange);
}

.purple {
    color: var(--purple);
}

.red {
    color: var(--red);
}

/* AUDIT */

#auditDates {
    column-gap: 30px;
    display: flex;
    justify-content: space-around;
    margin-bottom: 0px;

    b {
        font-weight: 600;
        margin-left: 3px;
    }

    #auditPeriod::before,
    #auditDue::before {
        font-family: var(--iconFont);
        font-weight: 500;
        margin-right: 8px;
    }

    #auditPeriod {
        color: var(--blue);

        &::before {
            content: "\f073";
        }
    }

    #auditDue {
        color: var(--red);

        &::before {
            content: "\f34e";
        }
    }
}

#auditInfo,
#auditCategories {
    border-radius: 10px;
    font-family: var(--altFont);
    margin: 15px 0;
    padding: 10px 20px;
}

#auditInfo {
    background: rgb(255 255 255 / 40%);
}

#auditCategories {
    background: rgb(223 235 237 / 70%);
    display: flex;
    flex-wrap: wrap;
    font-weight: 500;
    gap: 7px 20px;

    span {
        color: var(--darkColor);
        cursor: pointer;
        text-decoration: underline;
        font-weight: 700;

        &:hover {
            text-decoration: none;
        }

        &:active {
            color: black;
        }
    }
}

#auditActions {
    display: flex;
    gap: 10px;
    list-style: none;
    justify-content: flex-end;
    margin: 0 0 20px 0;
    padding: 0;

    li {
        background: var(--midColor);
        border-radius: 5px;

        &:hover {
            background: var(--lightColor);
        }

        &:active {
            box-shadow: var(--buttonPress);
        }
    }

    a {
        box-shadow: 0 0 10px rgb(113 136 143 / 60%);
        color: #fff;
        display: block;
        font-family: var(--altFont);
        font-size: 15px;
        font-weight: 500;
        line-height: 1.2em;
        padding: 10px 15px;
        text-decoration: none;

        &[data-icon]::before {
            content: attr(data-icon);
            font-family: var(--iconFont);
            font-weight: 600;
            margin-right: 7px;
        }

        &.on {
            color: #ffe24b;
        }
    }
}

.auditCategory {
    .auditCategoryTitle {
        color: var(--midColor);
        cursor: pointer;
        font-family: var(--altFont);
        font-size: 23px;
        font-weight: 700;
        margin-left: 10px;
        text-align: left;
        width: max-content;

        &::before {
            content: "\f107";
            display: inline-block;
            font-family: var(--iconFont);
            margin-right: 15px;
            text-align: center;
            width: 17px;
        }

        &:hover {
            color: var(--darkColor);
        }
    }

    &.collapsed {
        .auditCategoryTitle {
            &::before {
                content: "\f105";
            }

            &::after {
                color: var(--lightColor);
                content: "\f141";
                font-family: var(--iconFont);
                font-weight: 700;
                margin-left: 15px;
            }
        }

        .auditCategoryQuestions {
            .auditCategoryQuestion {
                display: none;
            }
        }
    }

    .auditCategoryQuestions {
        margin-top: 10px;
        text-align: left;
    }
    
    &+.auditCategory {
        margin-top: 30px;
    }
}

.auditCategoryQuestion {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgb(0 0 0 / 25%);
    column-gap: 40px;
    display: flex;
    line-height: 1.4em;
    padding-right: 30px;

    &+.auditCategoryQuestion {
        margin-top: 10px;
    }

    .auditCategoryQuestionLeft {
        background: var(--midColor);
        border-radius: 10px 0 0 10px;
        color: #fff;
        display: flex;
        flex: 0 0 70px;
        flex-direction: column;
        font-family: var(--altFont);
        font-size: 20px;
        font-weight: 600;
        justify-content: space-between;
        line-height: 1em;
        padding: 15px 0;
        text-align: center;
        
        &>div:last-child a {
            color: #fff;
            font-size: 12px;
            font-weight: 400;

            &::before {
                content: "\f3e5";
                display: inline-block;
                font-family: var(--iconFont);
                font-size: 24px;
                font-weight: 600;
                margin-bottom: 4px;
                text-decoration: none;
                width: 100%;
            }
        }
    }

    .auditCategoryQuestionMain {
        flex: 1;
        padding: 40px 0;
        position: relative;

        .auditCategoryQuestionHeading {
            color: var(--midColor);
            font-family: var(--altFont);
            font-size: 18px;
            font-weight: 700;
            line-height: 18px;
            padding-bottom: 7px;

            &:not(:first-child) {
                padding-top: 30px;
            }

            time {
                font-size: 14px;
                font-weight: 500;
                margin-left: 10px;

                &::before {
                    content: attr(data-label) ":";
                    font-weight: 400;
                    margin-right: 5px;
                }
            }
        }

        .auditCategoryQuestionQuoteServicer,
        .auditCategoryQuestionQuoteAuditor {
            background: #eaeff1;
            border-radius: 10px;
            border: 0;
            padding: 12px 20px;

            strong {
                font-weight: 600;
            }

            hr {
                border-bottom-width: 2px;
                margin: 10px 0;
            }
        }

        .auditCategoryQuestionQuoteServicer {
            border-right: 7px solid #d6e2e5;
        }

        .auditCategoryQuestionQuoteAuditor {
            border-left: 7px solid #d6e2e5;

            &.resultBlue {
                background: #e5e8f3;
                border-left-color: var(--blue);
            }

            &.resultGreen {
                background: #e2f0eb;
                border-left-color: var(--green);
            }

            &.resultOrange {
                background: #f5eae0;
                border-left-color: var(--orange);
            }

            &.resultPurple {
                background: #f3e7ff;
                border-left-color: var(--purple);
            }

            &.resultRed {
                background: #ffeaea;
                border-left-color: var(--red);
            }
        }

        .auditCategoryQuestionResult {
            font-weight: 700;
        }

        .auditCategoryQuestionStatus {
            font-family: var(--altFont);
            font-weight: 500;
            line-height: 1.4em;
            margin: 35px 0 0 auto;
            text-align: right;

            &.auditCategoryQuestionStatus0,
            &.auditCategoryQuestionStatus1 {
                color: #c32c2c;

                &::before {
                    content: "\f057";
                }
            }

            &.auditCategoryQuestionStatus2 {
                color: #005f3a;

                &::before {
                    content: "\f058";
                }
            }

            &::before {
                font-family: var(--iconFont);
                font-weight: 500;
                margin-right: 5px;
                vertical-align: bottom;
            }
        }

        hr {
            margin: 40px 0;
        }

        ul,
        ol {
            margin: 5px 0;
        }

        p {
            margin: 0;
            padding: 0;
        }
    }
}

.question,
.auditCategoryQuestion {
    #responseOptions {
        margin-top: 15px;
    }

    #responseInput {
        margin-top: 15px;
    }

    #responseUpload {
        margin: 30px 0 10px 0;

        label {
            color: var(--midColor);
            cursor: pointer;
            font-family: var(--altFont);
            font-weight: 700;
            text-decoration: underline;

            &:hover {
                text-decoration: none;
            }
        }
    }

    #responseUploads {
        font-family: var(--altFont);
        font-feature-settings: "tnum";
        font-size: 16px;
        list-style: none;
        padding: 0 0 0 10px;

        li {
            margin: 6px 0;
            padding: 0;
            
            a {
                font-weight: 500;
            }

            .deleteUpload {
                color: var(--red);
                cursor: pointer;
                font-weight: 500;
                text-decoration: underline;
                margin-right: 10px;

                &:hover {
                    text-decoration: none;
                }

                &::before {
                    content: "\f2ed";
                    display: inline-block;
                    font-family: var(--iconFont);
                    margin-right: 2px;
                    text-decoration: none;
                }
            }
        }
    }

    #responseSelect {
        margin-top: 50px;
    }
}

/* FORM FIELDS */

select, 
input[type=text], 
input[type=password] {
    background: #f8f8f8;
    border-color: #aaa;
    border-radius: 3px;
    border-style: solid;
    border-width: 1px;
    box-shadow: 2px 2px 2px inset #eee;
    box-sizing: border-box;
    color: #000;
    font-family: var(--font);
    font-size: var(--fontSize);
    font-weight: 400;
    max-width: 100%;
    padding: 10px;
    width: 100%;

    &:focus {
        background: #fff;
        border-color: #3f95ab;
    }
}

select {
    cursor: pointer;
}

input[type=file] {
    display: none;
}

#loginKey {
    font-feature-settings: "tnum";
    font-size: 28px;
    font-weight: 700;
    text-align: center;
}

/* FORM LAYOUT */

.field {
    padding: 15px 0;

    div:first-child {
        color: var(--darkColor);
        font-weight: 700;
        line-height: 1;
        margin-bottom: 7px;
        text-align: left;
    }
}

/* BUTTONS */

.btn-area {
    margin: 50px 0;
    text-align: center;
}

.btn {
    background: var(--midColor);
    border: 0 solid rgb(45 67 73);
    border-radius: 3px;
    box-shadow: 0 0 10px rgb(113 136 143 / 6);
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-family: var(--altFont);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: .5px;
    line-height: 1;
    padding: 15px 35px;
    text-decoration: none;
    text-shadow: 0 2px 1px rgb(24 45 51 / 40%);

    &:hover {
        background: var(--lightColor);
        color: #eee;
    }

    &:active {
        box-shadow: var(--buttonPress);
    }

    &+.btn {
        margin-left: 10px;
    }

    i { 
        margin-right: 7px;
    }
}

/* DIALOG */

#dialog {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 0 20px rgb(0 0 0 / 50%);
    outline: 0;
    padding: 30px;
    text-align: left;

    header {
        color: var(--darkColor);
        font-family: var(--altFont);
        font-size: 19px;
        font-weight: 700;
        margin-bottom: 20px;
    }

    ul {
        margin: 0;
        padding-left: 20px;
    }

    i {
        color: var(--midColor);
        margin-right: 15px;
    }

    .dialogBtns {
        margin-top: 40px;
        text-align: right;

        button {
            background: var(--midColor);
            border: 0;
            border-radius: 5px;
            color: #fff;
            cursor: pointer;
            display: inline-block;
            font-family: var(--altFont);
            font-size: 16px;
            font-weight: 600;
            line-height: 1em;
            outline: 0;
            padding: 10px 15px;

            &:hover {
                background: var(--lightColor);
            }

            &:active {
                box-shadow: var(--buttonPress);
            }

            &+button {
                margin-left: 15px;
            }
        }
    }

    &::backdrop {
        backdrop-filter: blur(5px);
        background:rgb(100 100 100 / 30%);
    }
}

/* STATUS MESSAGES */

#alertSaved, 
#alertError {
    border-radius: 15px;
    box-shadow: 0 0 40px rgb(0 0 0 / 50%);
    color: #fff;
    font-family: var(--altFont);
    font-size: 17px;
    font-weight: 400;
    left: 0;
    line-height: 1em;
    margin: 0 auto;
    padding: 25px 35px;
    position: fixed;
    right: 0;
    top: 5px;
    width: fit-content;
    z-index: 9;
}

#alertSaved {
    background: var(--green);
}

#alertError {
    background: var(--red);
}