@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

@media (prefers-color-scheme: light) {
    :root {
        --Psion-ok-green: #009206;
        --Psion-warning-red: #920000;
        --Psion-amber: #ED8E00;
        --Psion-white: #F8F8F8;
        --Psion-banner-grey: #F0F0F0;
        --Psion-input-grey: #DFDFDF;
        --Psion-black: #000000;
        --Psion-deep-blue: #0B3F72;
        --Psion-light-blue: #1CC6DA;
        --Psion-banner-grad: linear-gradient(184.38deg, #0B3F72 0%, #1CC6DA 100%);
        --Psion-margin-grey: #B6B6B6;
        --Psion-icon-grey: #666666;
        --Psion-pure-white: #FFFFFF;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --Psion-ok-green: #009206;
        --Psion-warning-red: #920000;
        --Psion-amber: #ED8E00;
        --Psion-white: #F8F8F8;
        --Psion-banner-grey: #F0F0F0;
        --Psion-input-grey: #DFDFDF;
        --Psion-black: #000000;
        --Psion-deep-blue: #0B3F72;
        --Psion-light-blue: #1CC6DA;
        --Psion-banner-grad: linear-gradient(184.38deg, #0B3F72 0%, #1CC6DA 100%);
        --Psion-margin-grey: #B6B6B6;
        --Psion-icon-grey: #666666;
        --Psion-pure-white: #FFFFFF;
    }
}

html {
    /* font-size: 80%; */
    font-size: calc(12px + 0.05vw)
}

@media screen and (min-width: 2000px){
    html {
        font-size: calc(12px + 0.25vw)
    }
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--Psion-white);
    font-family: 'Inter';
    overflow: hidden;
}

p {
    margin: 0;
}

a {
    text-decoration: none !important;
    font-weight: bold;
    color: black;
    transition: color 0.5s;
}

a:hover {
    color: var(--Psion-icon-grey);
}

#sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    gap: 16px;
    width: 20%;
    max-width: 240px;
    height: 100vh;
    background: var(--Psion-banner-grad);
}

@media screen and (min-width: 2000px){
    #sidebar {
        max-width: 400px;
    }
}

#faultsform {
    display: flex;
    flex-direction: column;    
    margin: 0 !important;
    padding: 0 !important;
    gap: 16px;  
    width: 100%;
    overflow: hidden;
}

#banner {
    width: 100%;
    height: max-content;
    padding: 6px;
    padding-bottom: 40px;
}

#filter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    height: max-content;
    gap: 18px;
}

h4 {
    color: #F8F8F8;
    font-weight: bold;
}

input, textarea, select {
    padding: 2.5px 10px;
    background: var(--Psion-input-grey);
    color: var(--Psion-icon-grey);
    width: 100%;
    height: 2em;
    border: none;
    border-width: 2px;
    border-radius: 6px;
}

textarea {
    height: auto;
}

button {
    padding: 2.5px 10px;
    background: var(--Psion-input-grey);
    color: black;
    font-weight: bold;
    height: 2em;
    border: none;
    border-width: 2px;
    border-radius: 6px;
    transition: background-color 0.5s, color 0.5s;
}

button:hover {
    background-color: var(--Psion-deep-blue);
    color: var(--Psion-pure-white);
}

.fault-save:hover {
    background-color: var(--Psion-ok-green);
}

.fault-close:hover {
    background-color: var(--Psion-warning-red);
}

#nav-category {
    display: flex;
    flex-direction: column;
    
    gap: 16px;
    width: 100%;
    height: 100%;
    overflow-y: scroll;
}

#nav-category::-webkit-scrollbar {
    display: none;
}

.accordion {
    width: 100%;
    height: fit-content;
    font-size: 1rem;
    --bs-accordion-bg: transparent;
    --bs-accordion-border-color: none;
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,<svg width='8' height='7' viewBox='0 0 11 10' fill='none' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M5.5 0C5.68941 0 5.87106 0.0658408 6.00499 0.183038C6.13892 0.300235 6.21416 0.459188 6.21416 0.62493V7.86537L9.27932 5.18192C9.34572 5.12382 9.42455 5.07773 9.5113 5.04628C9.59805 5.01484 9.69104 4.99865 9.78494 4.99865C9.87884 4.99865 9.97183 5.01484 10.0586 5.04628C10.1453 5.07773 10.2242 5.12382 10.2906 5.18192C10.357 5.24002 10.4096 5.309 10.4456 5.38492C10.4815 5.46083 10.5 5.5422 10.5 5.62437C10.5 5.70654 10.4815 5.78791 10.4456 5.86382C10.4096 5.93974 10.357 6.00872 10.2906 6.06682L6.00562 9.8164C5.93928 9.8746 5.86048 9.92077 5.77371 9.95228C5.68695 9.98378 5.59394 10 5.5 10C5.40606 10 5.31305 9.98378 5.22629 9.95228C5.13952 9.92077 5.06072 9.8746 4.99438 9.8164L0.709436 6.06682C0.643037 6.00872 0.590366 5.93974 0.554431 5.86382C0.518496 5.78791 0.5 5.70654 0.5 5.62437C0.5 5.5422 0.518496 5.46083 0.554431 5.38492C0.590366 5.309 0.643037 5.24002 0.709436 5.18192C0.843536 5.06458 1.02541 4.99865 1.21506 4.99865C1.30896 4.99865 1.40195 5.01484 1.4887 5.04628C1.57546 5.07773 1.65428 5.12382 1.72068 5.18192L4.78584 7.86537V0.62493C4.78584 0.459188 4.86108 0.300235 4.99502 0.183038C5.12895 0.0658408 5.31059 0 5.5 0Z' fill='white'/></svg>");
    --bs-accordion-btn-icon: url("data:image/svg+xml,<svg width='8' height='7' viewBox='0 0 11 10' fill='none' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M5.5 0C5.68941 0 5.87106 0.0658408 6.00499 0.183038C6.13892 0.300235 6.21416 0.459188 6.21416 0.62493V7.86537L9.27932 5.18192C9.34572 5.12382 9.42455 5.07773 9.5113 5.04628C9.59805 5.01484 9.69104 4.99865 9.78494 4.99865C9.87884 4.99865 9.97183 5.01484 10.0586 5.04628C10.1453 5.07773 10.2242 5.12382 10.2906 5.18192C10.357 5.24002 10.4096 5.309 10.4456 5.38492C10.4815 5.46083 10.5 5.5422 10.5 5.62437C10.5 5.70654 10.4815 5.78791 10.4456 5.86382C10.4096 5.93974 10.357 6.00872 10.2906 6.06682L6.00562 9.8164C5.93928 9.8746 5.86048 9.92077 5.77371 9.95228C5.68695 9.98378 5.59394 10 5.5 10C5.40606 10 5.31305 9.98378 5.22629 9.95228C5.13952 9.92077 5.06072 9.8746 4.99438 9.8164L0.709436 6.06682C0.643037 6.00872 0.590366 5.93974 0.554431 5.86382C0.518496 5.78791 0.5 5.70654 0.5 5.62437C0.5 5.5422 0.518496 5.46083 0.554431 5.38492C0.590366 5.309 0.643037 5.24002 0.709436 5.18192C0.843536 5.06458 1.02541 4.99865 1.21506 4.99865C1.30896 4.99865 1.40195 5.01484 1.4887 5.04628C1.57546 5.07773 1.65428 5.12382 1.72068 5.18192L4.78584 7.86537V0.62493C4.78584 0.459188 4.86108 0.300235 4.99502 0.183038C5.12895 0.0658408 5.31059 0 5.5 0Z' fill='white'/></svg>");
}

.accordion-item {
    margin-bottom: 10px;
    border: none;
    border-radius: 6px !important;
    overflow: hidden;
}

.accordion-button {
    border: none;
    border-radius: 6px !important;
    background-color: var(--Psion-deep-blue);
    color: var(--Psion-pure-white);
    font-weight: 600;
    /* padding: 6px 10px; */
}

.accordion-button[aria-expanded="true"] {
    background-color: var(--Psion-light-blue);
}

.accordion-button[aria-expanded="false"] {
    background-color: var(--Psion-deep-blue);
}

.accordion-button:not(.collapsed) {
    color: var(--Psion-pure-white);
}

.accordion-body {
    background-color: transparent;
    color: var(--Psion-pure-white);
}

.form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: 1rem;
}

.form-check .form-check-input {
    float: left;
    margin-left: -2em;
}

.form-check-input {
    width: 1.5em;
    height: 1.5em;
    margin-top: 0;
}

main {
    height: 100vh;
}

#results {
    overflow-y: auto;
    height: 100%;
    width: 100%;
}

.flexitable {
    width: 100%;
    border-spacing: 1px;
}

.flexitable thead {
    padding: 3em;
    height: 3rem;
    background: var(--Psion-banner-grey);
}

.flexitable tbody tr {
    padding: 0;
    height: 3.5rem;
    background: var(--Psion-pure-white);
    border-bottom: 1px solid var(--Psion-margin-grey);

}
.flexitable thead tr th {
    padding: 0.5rem 0.75rem;
}
.flexitable tbody tr td {
    padding: 0.5rem;
}

.flexitable thead tr th {
    border-left: var(--Psion-margin-grey) solid 2px;
}

.flexitable thead tr th:first-child {
    border: none;
    border-top-left-radius: 10px;
}

.flexitable thead tr th:first-child {
    border-bottom-left-radius: 10px;
}

.flexitable thead tr th:last-child {
    border-top-right-radius: 10px;
}

.flexitable thead tr th:last-child {
    border-bottom-right-radius: 10px;
}

.flexitable tbody tr:first-child td:first-child {
    border-top-left-radius: 10px;
}

.flexitable tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.flexitable tbody tr:first-child td:last-child {
    border-top-right-radius: 10px;
}

.flexitable tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

#createfault {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: max-content;
    transform: translate(-50%, -50%);
    background-color: var(--Psion-white);
    box-shadow: 0px 0px 10px 4px rgba(0, 0, 0, 0.25);
    border: 1px solid #B6B6B6;
    border-radius: 10px;
}

#faultForm {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 10px;
    padding: 20px;
    max-height: 70vh;
    overflow-y: scroll;
}

.fault-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,<svg width='8' height='7' viewBox='0 0 11 10' fill='none' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M5.5 0C5.68941 0 5.87106 0.0658408 6.00499 0.183038C6.13892 0.300235 6.21416 0.459188 6.21416 0.62493V7.86537L9.27932 5.18192C9.34572 5.12382 9.42455 5.07773 9.5113 5.04628C9.59805 5.01484 9.69104 4.99865 9.78494 4.99865C9.87884 4.99865 9.97183 5.01484 10.0586 5.04628C10.1453 5.07773 10.2242 5.12382 10.2906 5.18192C10.357 5.24002 10.4096 5.309 10.4456 5.38492C10.4815 5.46083 10.5 5.5422 10.5 5.62437C10.5 5.70654 10.4815 5.78791 10.4456 5.86382C10.4096 5.93974 10.357 6.00872 10.2906 6.06682L6.00562 9.8164C5.93928 9.8746 5.86048 9.92077 5.77371 9.95228C5.68695 9.98378 5.59394 10 5.5 10C5.40606 10 5.31305 9.98378 5.22629 9.95228C5.13952 9.92077 5.06072 9.8746 4.99438 9.8164L0.709436 6.06682C0.643037 6.00872 0.590366 5.93974 0.554431 5.86382C0.518496 5.78791 0.5 5.70654 0.5 5.62437C0.5 5.5422 0.518496 5.46083 0.554431 5.38492C0.590366 5.309 0.643037 5.24002 0.709436 5.18192C0.843536 5.06458 1.02541 4.99865 1.21506 4.99865C1.30896 4.99865 1.40195 5.01484 1.4887 5.04628C1.57546 5.07773 1.65428 5.12382 1.72068 5.18192L4.78584 7.86537V0.62493C4.78584 0.459188 4.86108 0.300235 4.99502 0.183038C5.12895 0.0658408 5.31059 0 5.5 0Z' fill='grey'/></svg>");
    --bs-accordion-btn-icon: url("data:image/svg+xml,<svg width='8' height='7' viewBox='0 0 11 10' fill='none' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M5.5 0C5.68941 0 5.87106 0.0658408 6.00499 0.183038C6.13892 0.300235 6.21416 0.459188 6.21416 0.62493V7.86537L9.27932 5.18192C9.34572 5.12382 9.42455 5.07773 9.5113 5.04628C9.59805 5.01484 9.69104 4.99865 9.78494 4.99865C9.87884 4.99865 9.97183 5.01484 10.0586 5.04628C10.1453 5.07773 10.2242 5.12382 10.2906 5.18192C10.357 5.24002 10.4096 5.309 10.4456 5.38492C10.4815 5.46083 10.5 5.5422 10.5 5.62437C10.5 5.70654 10.4815 5.78791 10.4456 5.86382C10.4096 5.93974 10.357 6.00872 10.2906 6.06682L6.00562 9.8164C5.93928 9.8746 5.86048 9.92077 5.77371 9.95228C5.68695 9.98378 5.59394 10 5.5 10C5.40606 10 5.31305 9.98378 5.22629 9.95228C5.13952 9.92077 5.06072 9.8746 4.99438 9.8164L0.709436 6.06682C0.643037 6.00872 0.590366 5.93974 0.554431 5.86382C0.518496 5.78791 0.5 5.70654 0.5 5.62437C0.5 5.5422 0.518496 5.46083 0.554431 5.38492C0.590366 5.309 0.643037 5.24002 0.709436 5.18192C0.843536 5.06458 1.02541 4.99865 1.21506 4.99865C1.30896 4.99865 1.40195 5.01484 1.4887 5.04628C1.57546 5.07773 1.65428 5.12382 1.72068 5.18192L4.78584 7.86537V0.62493C4.78584 0.459188 4.86108 0.300235 4.99502 0.183038C5.12895 0.0658408 5.31059 0 5.5 0Z' fill='grey'/></svg>");
}

.fault-col .accordion-button {
    background: var(--Psion-input-grey);
    color: var(--Psion-icon-grey);
}

.fault-col .accordion-body {
    background-color: transparent;
    color: var(--Psion-black);
}

.fault-col .accordion-item {
    margin-bottom: 0;
}

#createfault p {
    margin: 0;
}

.fault-col p {
    padding-left: 10px;
    font-weight: bold;
}

#faultForm-header,
#faultForm-footer {
    width: 100%;
    padding: 15px;
}

#faultForm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--Psion-margin-grey);
    padding: 10px 20px;
}

#faultForm-footer {
    display: flex;
    justify-content: right;
    gap: 10px;
    border-top: 1px solid var(--Psion-margin-grey);
    padding: 14px 20px;
    float: right;
}

#legacy-toggle-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.Open, .Complete, .Closed, .Deleted, .Inprogress{
    text-align: center;
    color: white;
    padding: 0.6rem;
    border-radius: 20px;
}

.Open {background: var(--Psion-warning-red);}
.Complete {background: var(--Psion-amber);}
.Closed {background: var(--Psion-ok-green);}
.Deleted {background: var(--Psion-margin-grey);}
.Inprogress {background: var(--Psion-deep-blue);}