﻿
:root {
    --colour-bg-dark: oklch(0.8 0.01 195);
    --colour-bg: oklch(0.85 0.01 195);
    --colour-bg-light: oklch(0.9 0.01 195);
    --colour-text: oklch(0.15 0.01 230);
    --colour-text-muted: oklch(0.4 0.01 230);
    --colour-highlight: oklch(1 0.01 230);
    --colour-border: oklch(0.6 0.01 230);
    --colour-border-muted: oklch(0.7 0.01 230);
    --colour-action-primary: oklch(0.4 0.1 230);
    --colour-action-secondary: oklch(0.4 0.1 110);
    --colour-danger: oklch(0.5 0.2 30);
    --colour-warning: oklch(0.5 0.2 100);
    --colour-success: oklch(0.5 0.2 160);
    --colour-info: oklch(0.5 0.2 260);
}

@media (prefers-color-scheme: dark) {

    :root {
        --colour-bg-dark: oklch(0.25 0.01 195);
        --colour-bg: oklch(0.32 0.01 195);
        --colour-bg-light: oklch(0.4 0.01 195);
        --colour-text: oklch(0.96 0.01 230);
        --colour-text-muted: oklch(0.76 0.01 230);
        --colour-highlight: oklch(0.5 0.01 230);
        --colour-border: oklch(0.6 0.01 230);
        --colour-action-border-muted: oklch(0.5 0.01 230);
        --colour-action-primary: oklch(0.76 0.1 230);
        --colour-secondary: oklch(0.76 0.1 110);
        --colour-danger: oklch(0.7 0.2 30);
        --colour-warning: oklch(0.7 0.2 100);
        --colour-success: oklch(0.7 0.2 160);
        --colour-info: oklch(0.7 0.2 260);
    }
}


/* global */

html, body {
    margin: 0;
    padding: 0;
    /* font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; */
    font-family: Roobert, sans-serif;
    background-color: var(--colour-bg-light);
    color: var(--colour-text);
    background-color: var(--colour-bg);
    background-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='16' viewBox='0 0 12 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 .99C4 .445 4.444 0 5 0c.552 0 1 .45 1 .99v4.02C6 5.555 5.556 6 5 6c-.552 0-1-.45-1-.99V.99zm6 8c0-.546.444-.99 1-.99.552 0 1 .45 1 .99v4.02c0 .546-.444.99-1 .99-.552 0-1-.45-1-.99V8.99z' fill='%239C92AC' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
}

h1 {
    font-weight: normal;
    text-align: center;
}

.page {
    margin: 0;
    padding: 0;
}

main {
    margin: -0.75em 1em 0em 19em;
    position: relative;
}

article {
    background-color: var(--colour-bg-light);
    border-radius: 0em 1em 1em 0em;
    padding: 2em 1em 3em 2em;
    position: absolute;
    left: 0;
    top: 0;
    min-width: 65vw;
    z-index: 4;
    border: 1px solid var(--colour-border);
    border-radius: 0.25em;
    animation-name: slideDown;
    animation-duration: 0.2s;
    margin-top: -0vh;
}

    @keyframes slideDown {
        0%   {margin-top: -90vh;}
        100% {margin-top: -0vh;}
    }

    article:has( article) {
        margin-top: -90vh;
        animation-name: slideUp;
        animation-duration: 0.2s;
    }

    @keyframes slideUp {
        0%   {margin-top: -0vh;}
        100% {margin-top: -90vh;}
    }

    article::before {
        display: block;
        content: attr(name);
        width: calc(100% - 2em);
        background-color: var(--colour-bg-dark);
        top: 0;
        left: 0;
        position: absolute;
        padding: 0.5em 1em 0.5em 1em;
        font-weight: bold;
        border-radius: 0.5em 0.5em 0em 0em;
    }

    article article {
        position: absolute;
        top: 90vh;
        left: 0em;
        min-width: 65vw;
    }

 button:has(+ table) {
    margin-bottom: 1em;
}

table.table {
    width: 100%;
    border: 3px solid var(--colour-bg);
    border-radius: 0.25em;
    border-spacing: 0px;
}

table.table thead {
    background-color: var(--colour-bg-dark);
}
 
table.table thead th:first-child {
    border-left: 0px;
}
 
table.table thead th {
    padding: 0.5em;
    font-weight: normal;
    margin: 0;
    border-left: 1px solid var(--colour-bg-light);
}
 
table.table tbody td {
    padding: 0.25em;
    border-bottom: solid 1px var(--colour-border);
    background-color: var(--colour-bg);
}

table.table tbody tr:last-child td {
    border-bottom: none;
}

div.table-blur {
    display: none;
}

html:has( article), 
body:has( article) {
    background-color: var(--colour-bg-light);
}

div.table-blur:has(+ article) {
    position: fixed;
    top: 0;
    right: 0;
    width: calc(100vw - 19em);
    height: 100vh;
    background-color: var(--colour-bg-light);
    opacity: 0.8;
    display: block;
    z-index: 3;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* global end */

/* menu */

nav {
    display: flex;
    flex-direction: column;
    background-color: var(--colour-bg-dark);
    position: fixed;
    left: 0.5em;
    top: 0.5em;
    bottom: 0.5em;
    padding-top: 1em;
    width: 18em;
    border: 1px solid var(--colour-highlight-dark);
    border-radius: 0.5em;
    z-index: 6;
    justify-content: space-between;
}

nav section div.menu-header {
    font-size: 1.5em;
    width: calc(100% - 2em);
    height: 100px;
    margin-bottom: 1em;
    border-bottom: solid 1px var(--colour-border-muted);
    background: url("images/workflow-full.png") no-repeat;
    background-size: 200px;
    background-position-x: 50%;
}

nav section.menu-footer div:first-child  {
    border-top: solid 1px var(--colour-border-muted);
    width: calc(100% - 3em);
}

nav section div.menu-section {
    margin-top: 2em;
    color: var(--colour-text-muted);
}

    nav div {
        margin-left: 1em;
    }

        nav div a {
            text-decoration: none;
            color: var(--colour-text);
            border-left: 3px solid transparent;
            padding: 1em;
            display: block;
        }

        nav div a.active {
            border-left: 3px solid var(--colour-border-muted);
        }

        nav div svg {
            height: 16px;
        }

        nav div svg path {
            stroke: var(--colour-text);
        }

    nav div.menu-toggle path {
        display: flex;
        justify-content: space-between;
        padding-right: 1rem;
        font-size: 1.5em;
    }

/* menu end */


/* form control area */

.form-control-area {
    background-color: var(--colour-bg);
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    padding: 1em;
    margin-bottom: 2em;
    max-width: 45em;
}

.form-control-sub-list  {
    background-color: var(--colour-bg-light);
    padding: 1em;
    margin-bottom: 2em;
}

    .form-control-sub-list input {
        padding: 0.3em;
        border-radius: 0.3em;
        min-width: 14em;
        color: var(--colour-text);
        background-color: var(--colour-bg-light);
        border-style: solid;
    }

    .form-control-sub-list button {
        height: 1.75em;
    }

/* form control area end */


/* form Item */

div.form-item {
    position: relative;
    padding: 0.5em;
    background-color: inherit;
}

    div.form-item label {
        position: absolute;
        left: 1.5em;
        top: -0.1em;
        padding: 0 0.6em 0 0.6em;
        font-size: 0.8em;
        color: var(--colour-text);
        background-color: inherit;
    }

    div.form-item input {
        padding: 0.3em;
        border-radius: 0.3em;
        min-width: 14em;
        color: var(--colour-text);
        background-color: var(--colour-bg-light);
        border-style: solid;
    }

    div.form-item select {
        padding-left: 0.1em;
        padding-top: 0.4em;
        padding-right: 0.4em;
        padding-bottom: 0.4em;
        border-radius: 0.3em;
        border-width: 2px;
        min-width: 15em;
        color: var(--colour-text);
        background-color: var(--colour-bg-light);
    }

    div.form-item span {
        min-width: 14em;
    }

    div.form-item select.allow-edit {
        min-width: 12.5em;
    }

    div.form-item button.select-button {
        display: inline-block;
        width: 1.75em;
        margin-left: 0.25em;
    }

/* form Item end */


/* form ReadOnly */

div.form-read-only {
    position: relative;
    padding: 0.5em;
    color: var(--colour-text);
    min-width: 14em;
}

    div.form-read-only label {
        font-size: 0.8em;
    }

    div.form-read-only span {
        font-weight: bold;
    }

/* form ReadOnly end */


/* button */

button {
    background-color: #fff;
    border: 1px solid var(--colour-info);
    height: 2em;
    transition: 1s;
    font-size: 1em;
    border-radius: 0.4em;
    display: flex;
    gap: 0.5em;
    align-items: center;
}

    button svg {
        width: 0;
        transition: .5s;
    }

    button span {
        color: var(--colour-info);
        margin: 0 8px 0 8px;
        transition: .5s;
        font-weight: bold;
    }

    button:hover {
        background-color: var(--colour-info);
    }

        button:hover span {
            color: #fff;
        }

    button.text-icon:hover span {
        margin: 0;
    }

    button.text-icon:hover svg {
        width: 16px;
    }

        button.text-icon:hover svg path {
            fill: #fff;
        }




    button.positive {
        border: 1px solid var(--colour-success);
    }

        button.positive span {
            color: var(--colour-success);
        }

        button.positive:hover span {
            color: #fff;
        }

        button.positive:hover {
            background-color: var(--colour-success);
        }

    button.warning {
        border: 1px solid var(--colour-action-warning);
    }

        button.warning span {
            color: var(--colour-action-warning);
        }

        button.warning:hover span {
            color: #fff;
        }

        button.warning:hover {
            background-color: var(--colour-action-warning);
        }

    button.negative {
        border: 1px solid var(--colour-danger);
    }

        button.negative span {
            color: var(--colour-danger);
        }

        button.negative:hover span {
            color: #fff;
        }

        button.negative:hover {
            background-color: var(--colour-danger);
        }


/* button end */

/* button group */

.button-group {
    display: flex;
    gap: 0.5em;
    justify-content: flex-end;
/*    position: absolute;
    bottom: 0.5em;
    right: 0.5em;*/
    margin-top: 1em;
}

/* button group end */


/* form dropdown */

.dropdown-edit-item {
    display: flex;
    gap: 0.5em;
    margin-top: 1em;
}

/* form dropdown end */


/* approval-step-tree */

.approval-step-tree ul {
    position: relative;
    padding: 1em 0; 
    white-space: nowrap;
    margin: 0 auto;
    text-align: center;
    &::after {
        content: '';
        display: table;
        clear: both;
    }
}

.approval-step-tree li {
    display: inline-block; 
    vertical-align: top;
    /* text-align: center; */
    text-align: left;
    list-style-type: none;
    position: relative;
    /* padding: 1em .5em 0 .5em; */
    /* padding: 1em .5em 0 0; */
    padding: 1em 0em 0 0;
    margin-right: 1em;
    &::before,
    &::after {
        content: '';
        position: absolute; 
        top: 0; 
        right: 50%;
        /* right: 5em; */
        /* left: 0; */
        border-top: 2px solid var(--colour-border);
        width: 55%; 
        height: 1em;
    }
    &::after {
        /* right: auto;  */
        /* left: 50%; */
        right: 0;
        left: 8em;
        border-left: 2px solid var(--colour-border);
    }
    &:only-child::after,
    &:only-child::before {
        display: none;
    }
    &:only-child {
        padding-top: 0;
    }
    &:first-child::before,
    &:last-child::after {
        border: 0 none;
    }
    &:last-child::before {
        border-right: 2px solid var(--colour-border);
        border-radius: 0 5px 0 0;
    }
    &:first-child::after {
        border-radius: 5px 0 0 0;
        margin-right: -5em;
    }
    &:has( a) {
        width: 19em;
    }
}

.approval-step-tree ul ul::before {
    content: '';
    position: absolute; 
    top: 0; 
    /* left: 50%; */
    left: 8em;
    border-left: 2px solid var(--colour-border);
    width: 0; 
    height: 1em;
}

.approval-step-tree li a {
    border: 1px solid var(--colour-border);
    padding: .5em .75em;
    text-decoration: none;
    display: inline-block;
    border-radius: 5px;
    color: var(--colour-text);
    position: relative;
    top: 1px;
    text-align: left;
    width: 16em;
}

.approval-step-tree li a:hover,
.approval-step-tree li a:hover+ul li a {
    background: var(--colour-success);
    color: var(--colour-text);
    border: 1px solid var(--colour-success);
}

.approval-step-tree li a:hover + ul li::after, 
.approval-step-tree li a:hover + ul li::before, 
.approval-step-tree li a:hover + ul::before, 
.approval-step-tree li a:hover + ul ul::before {
	border-color: var(--colour-success);
}

.approval-step-tree .notification {
    border: var(--colour-info) 2px solid;
}

.approval-step-tree .approval { 
    border: var(--colour-warning) 2px solid;
}

.approval-step-tree li.add-child {
    position: absolute;
}

.approval-step-tree .has-children {
    margin-left: 7px;
}

.approval-step-tree .has-no-children {
    margin-left: -24px;
}

.approval-step-tree li:has( article),
.approval-step-tree ul:has( article),
.approval-step-tree div:has( article),
.approval-step-tree a:has( article) {
    position: static;
}

/* approval-step-tree end */


/* apptoval-steps */

.apptoval-steps {
    overflow: auto;
    background-color: var(--colour-bg-dark);
    padding: 1em;
}

.apptoval-steps svg {
    background-color: var(--colour-bg-dark);
}

.apptoval-steps .notification {
    stroke: var(--colour-info);
    fill: var(--colour-bg);
}

.apptoval-steps .approval {
    stroke: var(--colour-warning);
    fill: var(--colour-bg);
}

.rect circle {
    stroke: var(--colour-info);
}

.apptoval-steps circle {
    stroke: var(--colour-border);
}

.apptoval-steps .link {
    stroke: var(--colour-info);
}

.apptoval-steps text {
    stroke: var(--colour-text);
    stroke-width: 1px;
    font-size: 12px;
}

.apptoval-steps circle {
    stroke: var(--colour-border-muted);
    fill: var(--colour-border-muted);
}

.apptoval-steps .plus circle {
    fill: var(--colour-success);
}

.apptoval-steps .plus line {
    stroke: var(--colour-text);
    stroke-width: 2;
}

/* approval-step-tree dropdown end */