﻿
body {
    --sidebar-width: 1px;
    --sidebar-width-closed: 1px;
    --topmenu-height: 1px;
    --label-width: 8em;
}

div.dialog-outer {
    position: fixed;
    /*left: 1em;*/
    /*position: absolute;*/
    width: 480px;
    padding: 0;
    border: solid 1px black;
    border-radius: 0.5em;
    background-color: white;
    opacity: 0.95;
    margin: 0;
    z-index: 999999;
    max-height: calc(100vh - 50px - var(--topmenu-height));
    display: flex;
    flex-direction: column;
    transition-duration: 0.5s;
}

.sidebar-open div.dialog-outer {
    margin-left: calc(var(--sidebar-width) );
    max-width: calc( 100vw - var(--sidebar-width) - 1em);
}

.sidebar-open div.dialog-outer-page {
    margin-left: 0;  /*calc(var(--sidebar-width) - 1em);*/
    max-width: calc( 100vw - var(--sidebar-width) - 1em);
}


.sidebar-closed div.dialog-outer {
    margin-left: 2.5em;
    max-width: calc( 100vw - 3em);
}

.sidebar-closed div.dialog-outer-page {
    margin-left: 0 !important;  /*calc(var(--sidebar-width) - 1em);*/
}


    /*.sidebar-open div.dialog-outer.dialog-outer-page {*/
        /*transform: translateX(calc(var(--sidebar-width)));*/
        /*margin-left: calc(var(--sidebar-width));
    }

div.dialog-outer.dialog-outer-page {
    position: fixed;
    left: 1em;*/ /*2.5em;*/
    /*      margin: 0;
        margin: auto !important;*/
    /*
        width: 100% !important;
        height: 100%;
        padding: 0;
        border: solid 5px black;
        background-color: white;
        opacity: 0.95;
        z-index: 999999;
        max-height: calc(100vh - 50px - var(--topmenu-height));
        display: flex;
        flex-direction: column;
        left: 0 !important;
        top: 0 !important;
        */
/*}*/

div.dialog-title-bar {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 8px;
    color: white;
    background-color: #666;
    flex-shrink: 0;
}

    div.dialog-title-bar.dialog-page {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        padding: 8px;
        color: #333;
        background-color: white;
        flex-shrink: 0;
        font-size: 125%;
    }

div.dialog-body {
    padding: 8px;
    overflow-y: auto;
    flex-shrink: 1;
}

    div.dialog-body .container {
        width: 100% !important;
    }

    div.dialog-body > .row {
        width: 100% !important;
        margin: 0 !important;
    }

.dialog-title {
    display: inline-block;
    user-select: none;
    pointer-events: none;
    margin-bottom: 0;
}

.dialog-header-handle {
    cursor: move !important;
    margin-right: 3px;
}


div.dialog-after-title {
    display: inline-block;
    float: right;
    width: auto;
}

    div.dialog-after-title button {
        margin-left: 8px;
    }

div.dialog-footer {
    padding: 8px;
    border-top: 1px solid silver;
    text-align: right;
    flex-shrink: 0;
    child-spacing: 8px;
    min-height: 55px;
}

    div.dialog-footer > *:not(:last-child) {
        margin-right: 0.3em;
    }

    div.dialog-footer:empty {
        display: none;
    }

div.dialog-header {
    padding: 8px;
    border-bottom: 1px solid silver;
    overflow-y: auto;
    flex-shrink: 1;
    min-height: 41px;
}

    div.dialog-header:empty {
        display: none;
    }

div.dialog-header-skinny {
    padding: 0;
    border: none;
}


div.context-menu {
    position: absolute;
    width: auto;
    height: auto;
    border: solid 1px black;
    border-radius: 5px;
    background-color: #FFFFFFaa;
}

div.context-menu-title {
    border: solid 1px black;
    border-radius: 5px 5px 0 0;
    background-color: #000066;
    padding: 0 4px 0 4px;
    color: white;
}

div.context-menu-item {
    padding: 0 4px 0 4px;
    cursor: pointer;
}


@keyframes animation-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(359deg);
    }
}

.spin {
    animation: animation-spin 6s linear infinite;
}

div.lib-curtain {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #FFF;
    z-index: -1;
    /*pointer-events: none;*/
}

.frosty {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0055;
    color: #006;
    z-index: 999999;
    pointer-events: all;
}

.dropzone {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0055;
    z-index: 999999;
    /*pointer-events: none;*/
}

.full-page {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
}

.hidden {
    display: none;
}

.tabs-header {
    background-color: #6668;
    border-bottom: solid 1px silver;
    padding-top: 8px;
    margin-top: -8px;
    margin-left: -8px;
    margin-right: -8px;
}

.tabs-header-tab {
    display: inline-block;
    margin-left: 0.5em;
    margin-right: 0.5em;
    padding-left: 0.5em;
    padding-right: 0.5em;
    margin-bottom: -1px;
}

    .tabs-header-tab.tab-selected {
        background-color: white;
        border: solid 1px silver;
        border-bottom: solid 1px white;
        border-radius: 4px 4px 0 0;
    }

    .tabs-header-tab.tab-not-selected {
        color: blue;
        cursor: pointer;
    }


/*    tr.draggable-row td:not(:last-child) {
        pointer-events: none;
    }*/

td.draggable-row-handle {
    width: 1.5em !important;
}

tr.row-drag-over {
    background-color: pink !important;
}



.action-vbar:first-child {
    display: none;
}

.no-action-text {
    color: grey;
}

.action-text {
    cursor: pointer;
    color: blue;
}

    .action-text:hover {
        text-decoration: underline;
    }












.nav-icon {
    display: inline-block;
    font-size: 24px;
    margin: 0;
    padding: 0;
    margin-top: -24px;
    margin-left: -4px;
    padding-right: 14px;
}



.frosty {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0004;
    color: #006;
    z-index: 999999;
}

.dropzone {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0051;
    z-index: 999999;
}


.full-page {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
}



.form-group {
    display: block;
    contain: layout;
    container-type: inline-size;
}

    .form-group .form-label {
        display: block;
        text-align: left;
        width: 100%;
    }


    .form-group .form-control {
        display: block;
        width: 100%;
    }

    .form-group .form-select {
        display: block;
        width: 100%;
    }

        .form-group .form-select.short {
            display: inline-block;
            width: 10em;
        }

    .form-group .form-control.short {
        display: inline-block;
        width: 10em;
    }

    .form-group .validation-message {
        display: block;
    }

    .form-group.checkbox {
        display: block;
        vertical-align: middle;
    }


        .form-group.checkbox label {
            display: inline-block;
            text-align: left;
            vertical-align: middle;
            line-height: 1.5em;
            padding: 0;
            margin: 0;
            margin-top: -0.9em;
        }

        .form-group.checkbox input[type=checkbox] {
            margin-left: 0;
            margin-right: 0.25em;
            width: 1.5em;
            height: 1.5em;
            margin-top: 0.25em;
        }

            .form-group.checkbox input[type=checkbox]:checked {
                background-color: #0d6efd;
                border-color: #0d6efd
            }




@container (width > 24em) {

    .form-group.checkbox input {
        margin-left: calc(5px + var(--label-width));
    }

    .into-right {
        display: block;
        padding-left: var(--label-width) !important;
    }

    .formgroup.checkbox .validation-message {
        display: block;
        padding-left: var(--label-width) !important;
    }

    .form-group .validation-message {
        padding-left: var(--label-width);
    }

    .form-group .form-label {
        display: inline-block;
        width: var(--label-width);
        text-align: right;
        vertical-align: top;
        padding-top: 8px;
    }



    .form-group .form-control {
        display: inline-block;
        width: calc(100% - 1em - var(--label-width));
    }

    .form-group .form-select {
        display: inline-block;
        width: calc(100% - 1em - var(--label-width));
    }

        .form-group .form-select.short {
            display: inline-block;
            width: 10em;
        }

    .form-group.checkbox input[type=checkbox] {
        margin-left: calc(var(--label-width) + 4px);
    }
}

div.plain-page {
    padding: 0.5em;
}





fieldset {
    border: 1px solid #333333;
    border-radius: 0.5em;
    margin-top: 32px !important; /* leave room for legend */
    padding: 0.5em;
    background-color: var(--trans-bg-color);
}

    fieldset.unset-container {
        container-type: unset;
        contain: unset;
    }


    fieldset legend {
        font-size: 24px;
        margin-top: -38px; /* move up above border of fieldset   */
        margin-bottom: -38px; /* don't occupy space inside of fieldset */
        background-color: none;
    }

.float-right {
    float: right;
}

.float-left {
    float: left;
}

.btn.btn-smaller {
    font-size: 80%;
    padding: 0 4px 0 4px;
}



.btn-action {
    padding: 0;
}

html {
    --trans-bg-color: #ffffff88;
}

.rotate-right {
    transform: rotate(90deg);
}


.rotate-left {
    transform: rotate(270deg);
}

input[type=datetime] {
    max-width: 18em;
}

input[type=date] {
    max-width: 10em;
}

input[type=time] {
    max-width: 10em;
}



input[type=number] {
    max-width: 10em;
}



/*div.dialog-outer.dialog-outer-page {*/
    /*    position: relative;
    margin: auto;
*/
    /*width: calc(100% - var(--sidebar-width) - 4em );*/
    /*width: calc(100% - 4em );
    margin: 0;
}*/

.dropdown-menu {
    z-index: 9999999;
}

.readonly {
    background-color: #0002;
}


.nav-link {
    cursor: pointer;
    user-select: none;
}

.hover-bold:hover {
    font-weight: bold;
}

.hidden {
    display: none;
}


.form-group .btn {
    vertical-align: top;
}

.display-inline-block {
    display: inline-block;
}

.vertical-align-top {
    vertical-align: top;
}

.no-select {
    user-select: none;
}

/*div.flexy {
    display: block !important;
    width: 100%;
    position: relative;
}*/

.inline {
    display: inline-block !important;
    width: calc(100% / 4 - 2px);
    min-width: 10em;
    white-space: nowrap;
    position: relative;
}

.text-align-right {
    text-align: right;
}


.text-align-center {
    text-align: center;
}

div.dialog-title {
    max-width: 100%;
    overflow: clip;
    white-space: nowrap;
    text-overflow: ellipsis !important;
}

.th-group {
    text-align: center;
    border: 1px dotted black;       
}


.th-none {
    border: none;
}

.th-group-bottom {
    border: 1px dotted black;
}

label.required-field:after {
    color: red;
    content: " *";
    font-weight: bold;
}

legend.required-field:after {
    color: red;
    content: " *";
    font-weight: bold;
}