﻿.container {
    max-width: 1920px;
    width: 100%;
}

html {
    position: relative;
    -ms-scroll-chaining: none;
    overscroll-behavior: contain;
    height: 100%;
    font-size: 16px;
}

body {
    flex-direction: column;
    display: flex;
    height: 100%;
    margin-bottom: 70px auto 0; /* auto 0 fixes white space beneath footer in FF */
}

header {
    min-height: 60px;
    z-index: 999;
    /* background-color: floralwhite; */
}

main {
    flex: 1;
    min-height: 70vh;
    height: calc(100vh - 60px - 60px);
}

footer {
    position: absolute;
    bottom: 0;
    z-index: 998;
    width: 100%;
    height: 60px;
    line-height: 60px; /* Vertically center the text there */
    white-space: nowrap;
}

@media (max-width: 767.99px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 991.99px) {
    footer {
        font-size: 0.6em;
    }
}

a {
    color: #0366d6;
}

nav {
    /* background-color: orange; */
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    background-color: #1b6ec2;
    color: #fff;
    border-color: #1861ac;
}

a.navbar-brand {
    /* color: white !important; */
    white-space: normal;
    text-align: center;
    word-break: keep-all;
}

/*
button.navbar-toggler {
    color: white !important;
}
*/


/* Sticky footer styles
-------------------------------------------------- */
@media (max-width: 767.99px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */

/* footer colors */
.development {
    background-color: #20C997;
    /*
        set to blanchedalmond when doing assesments for accessibility with Google tools
        background-color: blanchedalmond;

    */
}

.preview {
    background-color: #87CEFA;
}

.test {
    background-color: #FFFF00;
}

.staging {
    background-color: #FFC107;
}

.mixed {
    background-color: chocolate;
}

.support {
    background-color: #9ACD32;
}

.production {
    background-color: blanchedalmond;
}

.text-primary {
    /*color: rgba(255,165,0, var(--bs-text-opacity)) !important;*/
}

.bg-primary {
    background-color: rgba(255,165,0, var(--bs-bg-opacity)) !important;
    /*
    color: black;
    */
}

.bg-standard {
    background-color: rgba(var(--bs-primary-rgb),var(--bs-bg-opacity)) !important;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}


dl dd:after {
    content: "\200b";
    margin-bottom: .2rem;
}

dl dt:after {
    content: "\200b";
}

.page-item.active .page-link {
    /* 
        background-color: red;
    */
    opacity: 0.75;
}

.pagination-container {
    margin-top: 20px;
}

.page-loc-info {
    font-size: 8pt;
}

.card:hover, .card:focus {
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}

.table-condensed, dl {
    font-size: 14px;
}

.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        left: 100%;
        /* -6px gives dropdown-menu's padding+border */
        top: -6px;
    }

    .dropdown-submenu:hover > .dropdown-menu, .dropdown-submenu > a:focus + .dropdown-menu {
        /* :focus support is incomplete - pressing Tab sets focus to submenu, but that immediately hides submenu */
        display: block;
    }

.ww-usr, .ww-pwd {
    max-width: 500px;
}

.info {
    font-size: 0.8em;
}

/* PowerBi scaling */
#report-container {
    height: calc(0.5625 * 61vw); /* 16:9 aspect ratio */
    min-height: 900px;
    max-height: calc(100vh - 200px);
    min-width: 900px;
}

#report-container-wbs {
    height: calc(0.5625 * 61vw); /* 16:9 aspect ratio */
    min-height: 600px;
    max-height: calc(100vh - 240px);
    min-width: 900px;
}

#report-container-wiz {
    height: calc(0.5625 * 61vw); /* 16:9 aspect ratio */
    min-height: 600px;
    max-height: calc(100vh - 360px);
    min-width: 900px;
}

/* WbkTecContent */
.card-pre-wrap {
    white-space: pre-wrap;
}

.card-wohn {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 0.75rem;
}

/* searchFor */
.form-input-dynamic {
    min-width: 200px;
    width: calc(100vw - 250px);
    max-width: 15vw;
}

/* hide in certain range only */
@media (min-width: 1400px) and (max-width: 1499.98px) {
    .d-xxxl-none-only {
        display: none !important;
    }
}
/* hide on lg only */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .d-lg-none-only {
        display: none !important;
    }
}

@media only screen and (max-width: 574px) {
    #report-container {
        height: calc(0.5625 * 100vw); /* 16:9 aspect ratio */
    }
}

@media only screen and (max-width: 991.9px) {
    /* Force table to not be like tables anymore */
    .table-responsive table, .table-responsive thead, .table-responsive tbody, .table-responsive th, .table-responsive td, .table-responsive tr {
        display: block;
    }
        /* Hide table headers (but not display: none;, for accessibility) */
        .table-responsive thead tr {
            position: absolute;
            top: -9999px;
            left: -9999px;
        }

    .table-responsive tr {
        border: 1px solid #ccc;
    }

    .table-responsive td {
        /* Behave like a "row" */
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 35%;
        white-space: normal;
        text-align: left;
        min-height: 28px;
    }

        .table-responsive td:before {
            /* Now like a table header */
            position: absolute;
            /* Top/left values mimic padding */
            top: 6px;
            left: 6px;
            width: 30%;
            padding-right: 10px;
            white-space: nowrap;
            text-align: left;
            font-weight: bold;
        }

        /* Label the data */
        .table-responsive td:before {
            content: attr(data-title);
        }
}

/* some special arrangements with nested tables */
#nestedTable {
    border: 3px solid blue; /* DEBUG */
    width: 98vw;
}

:root {
    --commonTableHeight: calc(100vh - 120px - 60px - 110px);
    --mediumTableHeight: calc(100vh - 120px - 60px - 250px);
    --anstTableHeight: calc(100vh - 120px - 60px - 300px);
    --reducedTableHeight: calc(100vh - 120px - 60px - 480px);
    --fasxBlockHeight: calc(100vh - 120px - 60px - 480px);
    --fasxTableHeight: 125px;
    --wohnFormHeight: calc(100vh - 120px - 60px - 30px);
}
/* Common sticky stuff */
.table-sticky-header, .table-sticky-header-medium, .table-sticky-header-anst, .table-sticky-header-reduced, .table-sticky-header-fasx, .table-sticky-header-embedded, .container-fasx-details, .table-home-embedded, .container-wohn {
    overflow-y: auto;
}

.container-wohn {
    height: var(--wohnFormHeight);
}

.table-sticky-header {
    height: var(--commonTableHeight);
}

.table-sticky-header-medium {
    height: var(--mediumTableHeight);
}

.table-sticky-header-anst {
    height: var(--anstTableHeight);
}

.table-sticky-header-reduced {
    height: var(--reducedTableHeight);
}

.table-sticky-header-fasx, .table-sticky-header-embedded {
    min-height: var(--fasxTableHeight);
    height: auto;
}

.table-sticky-header-fasx {
    max-height: calc(var(--fasxBlockHeight) / 3);
}

.table-sticky-header-embedded {
    max-height: calc(var(--fasxTableHeight) * 4);
}

.container-fasx-details {
    max-height: var(--fasxBlockHeight);
}

.filter-wohn {
    /* border: 5px solid blue; */ /* DEBUG */
    width: 90vw;
}

@media only screen and (min-width: 992px) {
    .table-sticky-header, .table-sticky-header-medium, .table-sticky-header-reduced, .table-sticky-header-fasx {
        width: 97vw; 
        /* border: 5px solid green; */ /* DEBUG */
    }
}

@media only screen and (min-width: 1200px) {
    .filter-wohn {
        width: 97vw;
        /* border: 5px solid green; */ /* DEBUG */
    }
}

.card-title-wivo {
   min-height: 20px;
}

.card-body-home, .card-body-piechart, .card-body-max {
    min-height: 300px;
}

.card-body-home, .card-body-piechart {
    overflow: auto;
    max-height: min(40vh, 720px);
}

.card-body-piechart {
    max-width: min(24vw, 720px);
}

.card-body-max {
    max-height: calc(100vh - 240px);
}

.sticky-header th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 2;
}

/* Sticky header */
th {
    position: sticky;
    top: 0;
    z-index: 2;
    /* color: yellow; */ /* DEBUG */
    /* border: 1px solid orange; */
}

/* WIVO specials */
th.protocol-label {
    display: flex;
    align-items: flex-end; /* align elements to bottom */
    justify-content: space-between; /* text left-hand, button right-hand */
    gap: 8px; /* pptional: space between text and button */
}

/* ✨ Animation for soft fading in/out */
.protocol-item {
    max-width: 0px;
    opacity: 0;
    transition: max-width 1.0s ease, opacity 1.0s ease;
    overflow: hidden;
    display: table-cell; /* no not change this, required for appearance of columns */
    white-space: nowrap;
    /* required with Chrome */
    width: 0 !important;
    padding: 0 !important;
    border: none !important;
}

    .protocol-item.show {
        max-width: 200px; /* maximum (adjust to content) */
        opacity: 1;
        /* required with Chrome */
        padding: 8px !important; /* Standard Bootstrap Table Padding 0.5rem does not work */
    }
th.protocol-item {
    vertical-align: bottom;
}

td.protocol-item {
    vertical-align: top;
}

/* tbody td, may have no effect */
tbody td {
    z-index: 1;
}


@media only screen and (min-width: 992px) {
    /* prior that brakepoint tables are renedered as label/vaue */

    /* sticky header and columns */
    .table-scrollable-y {
        border-collapse: collapse;
        overflow-x: auto;
        width: 101%;
    }

    /* Fixierte Kopfzeilen */
    .table-scrollable-y thead tr:first-child th {
        position: sticky;
        top: 0;
        /* background-color: lightblue; */ /* DEBUG */
        color: black;
        z-index: 4; /* Höher als zweite Kopfzeile */
    }

    .table-scrollable-y thead tr:nth-child(2) th {
        position: sticky;
        top: 40px;
        /* background-color: lightgoldenrodyellow; */ /* DEBUG */
        z-index: 3; /* Unter der ersten Kopfzeile */
    }

    /* Fixierte erste Spalte */
    .table-scrollable-y thead th:first-child, .table-scrollable-y tbody td:first-child {
        position: sticky;
        left: 0;
        /* background-color: thistle; */ /* DEBUG */
        z-index: 5; /* do not change */
    }

    /* First (viually second, when rowspan>1) column in second line of header */
    .table-scrollable-y thead tr:nth-child(2) th:first-child {
        z-index: 6; /* do not change */
        /* background-color: yellowgreen; DEBUG */
    }

    /* First column in first line of header */
    .table-scrollable-y thead tr:first-child th:first-child {
        z-index: 7; /* do not change */
        /* background-color: orange; DEBUG */
    }

    .table-scrollable-y tbody td:first-child {
        font-weight: bold;
    }

    /* used with WIVO */
    /* keep sticky fixed headers in front */
    .table-scrollable-wivo thead tr:first-child th:first-child, .table-scrollable-wivo thead tr:first-child th:nth-child(2), .table-scrollable-wivo thead tr:first-child th:nth-child(3), .table-scrollable-wivo thead tr:first-child th:nth-child(4) {
        /* inherits sticky from base th */
        z-index: 9;
        /* background-color: darkgoldenrod; DEBUG */
    }

    /* keep sticky fixed headers in front */
    .table-scrollable-wivo tbody td:first-child, .table-scrollable-wivo tbody td:nth-child(2), .table-scrollable-wivo tbody td:nth-child(3), .table-scrollable-wivo tbody td:nth-child(4) {
        position: sticky;
        z-index: 8;
        /* background-color: lightsalmon; DEBUG */
    }

    /* keep 1st col in viewport */
    .table-scrollable-wivo th:first-child, .table-scrollable-wivo td:first-child {
        left: 0;
        min-width: 150px;
        /* background-color: lightcoral; */ /* DEBUG */
        /* border-right: 1px solid red; */
    }

    /* keep n-th col in viewport */
    .table-scrollable-wivo th:nth-child(2), .table-scrollable-wivo td:nth-child(2) {
        left: 149px;
        min-width: 150px;
        /* background-color: lightgoldenrodyellow; */ /* DEBUG */
        /* border-right: 1px solid red; */
    }

    /* keep n+1-th col in viewport */
    .table-scrollable-wivo th:nth-child(3), .table-scrollable-wivo td:nth-child(3) {
        left: 298px;
        min-width: 200px;
        /* background-color: lightgreen; */ /* DEBUG */
        /* border-right: 1px solid red; */
    }

    /* keep n+2-th col in viewport */
    .table-scrollable-wivo th:nth-child(4), .table-scrollable-wivo td:nth-child(4) {
        left: 497px;
        min-width: 150px;
        /* background-color: lightblue; */ /* DEBUG */
        border-right: 1px solid red;
    }

    /* used with WOHN */
    /* keep sticky fixed headers in front */
    .table-scrollable-wohn thead tr:first-child th:first-child, .table-scrollable-wohn thead tr:first-child th:nth-child(7), .table-scrollable-wohn thead tr:first-child th:nth-child(8), .table-scrollable-wohn thead tr:first-child th:nth-child(9) {
        /* inherits sticky from base th */
        z-index: 9;
        /* background-color: darkkhaki; DEBUG */
    }

    /* keep sticky fixed headers in front */
    .table-scrollable-wohn tbody td:first-child, .table-scrollable-wohn tbody td:nth-child(7), .table-scrollable-wohn tbody td:nth-child(8), .table-scrollable-wohn tbody td:nth-child(9) {
        position: sticky;
        z-index: 8;
        /* background-color: lightpink; DEBUG*/
    }

    /* keep 1st col in viewport */
    .table-scrollable-wohn th:first-child, .table-scrollable-wohn td:first-child {
        left: 0;
        min-width: 300px;
        /* background-color: lightcoral; */ /* DEBUG */
        /* border-right: 1px solid red; */
    }

    /* keep n-th col in viewport */
    .table-scrollable-wohn th:nth-child(7), .table-scrollable-wohn td:nth-child(7) {
        left: 299px;
        min-width: 180px;
        /* background-color: lightgoldenrodyellow; */ /* DEBUG */
        /* border-right: 1px solid red; */
    }

    /* keep n+1-th col in viewport */
    .table-scrollable-wohn th:nth-child(8), .table-scrollable-wohn td:nth-child(8) {
        left: 478px;
        min-width: 60px;
        /* background-color: lightgreen; */ /* DEBUG */
        /* border-right: 1px solid red; */
    }

    /* keep n+2-th col in viewport */
    .table-scrollable-wohn th:nth-child(9), .table-scrollable-wohn td:nth-child(9) {
        left: 537px;
        min-width: 60px;
        /* background-color: lightblue; */ /* DEBUG */
        border-right: 1px solid red;
    }

}

@media (max-width: 1399.99px) {
    .card-header {
        font-size: 0.9em;
    }

    .btn > span.h1 {
        font-size: 1.6em;
    }

    .card-body > .row > .col > button.btn {
        font-size: 0.8em;
    }
}

/* traffic light */
/*! Light */
.light {
    background-color: #000;
    box-shadow: 0 0 2.5px rgba(0,0,0, .8);
    overflow: hidden;
    padding: 5px 5px 5px 5px;
    width: 72px;
    text-align: end;
    margin-left: 2px;
    border: outset;
    border-width: 4px;
}

    .light span {
        border-radius: 8px;
        display: grid;
        height: 16px;
        width: 16px;
        opacity: .5;
        margin: 1px;
    }

/*! Light colours */
.red {
    background-color: red;
}

.orange {
    background-color: orange;
}

.green {
    background-color: lawngreen;
}

/*! Active states */
.light span.active {
    opacity: 1;
}

.light .red.active {
    box-shadow: 0 0 5px red;
}

.light .orange.active {
    box-shadow: 0 0 5px orange;
}

.light .green.active {
    box-shadow: 0 0 5px green;
}

.status-text {
    display: inline-flex;
}

.status {
    background-color: #FFF;
    box-shadow: 0 0 2.5px rgba(255,255,255, .8);
    overflow: hidden;
    padding: 3px 3px 3px 3px;
    width: 28px;
    text-align: start;
    margin-left: 5px;
    display: inline-flex;
    /*
    background-color: lightgray;
    border: outset;
    border-width: 3px;
    */
}

    .status span {
        border-radius: 7px;
        display: inline-flex;
        height: 14px;
        width: 14px;
        margin: 1px;
        opacity: .5;
    }

        /*! Active states */
        .status span.active {
            opacity: 1;
        }

    .status .red.active {
        box-shadow: 0 0 5px red;
    }

    .status .orange.active {
        box-shadow: 0 0 5px orange;
    }

    .status .green.active {
        box-shadow: 0 0 5px green;
    }

.btn-inline {
    padding: 6px 12px 6px 12px;
    margin-right: 12px;
    vertical-align: central;
}

.w-mx-200 {
    max-width: 200px;
}

.offcanvas-bottom-height {
    min-height: 95vh;
}


.form-check-label-sm {
    font-size: 0.875em;
}

/* Select2 
.select2-container--bootstrap-5 .select2-selection {
    min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2)) !important;
    padding: 0.125rem 0.5rem !important;
    font-size: 0.875rem !important;
    border-radius: var(--bs-border-radius-sm) !important;
    line-height: 1.0;
}
*/
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search {
    background-color: #f6f6f6;
}
/*
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search .select2-search__field {
    height: calc(1.0em + 0.25rem + 1px) !important;
    margin-top: 0.25em !important;
}
*/
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
    font-size: 0.875rem !important;
    background-color: #eee !important;
    height: 2em !important;
}
/*
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove {
    width: 0.5rem !important;
    height: 0.5rem !important;
}
*/
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear {
    width: 0.5rem !important;
    height: 0.5rem !important;
    top: 0.75rem !important;
    right: 0.375rem !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option {
    font-size: 0.875em !important;
    line-height: 1em !important;
}

/* datalist not styleable without other impact as loosing resonsiveness, so accept browsers individual implementation */

/* WBS Wizard */
.container-wizard {
    overflow: auto;
    max-height: calc(100vh - 300px);
}

/* collapse trick */
/* Wenn Button geöffnet ist (collapsed fehlt), Chevron-Up zeigen */
.btn-rep-desc:not(.collapsed) .icon-closed {
    display: none;
}

.btn-rep-desc:not(.collapsed) .icon-open {
    display: inline;
}

/* Wenn Button geschlossen ist (collapsed vorhanden), Chevron-Down zeigen */
.btn-rep-desc.collapsed .icon-closed {
    display: inline;
}

.btn-rep-desc.collapsed .icon-open {
    display: none;
}

@media (min-width: 1400.00px) and (max-width: 1599.99px) {
    .btn-rep-box {
        max-width: 70%;
    }
}
@media (min-width: 1600.00px) and (max-width: 1799.99px) {
    .btn-rep-box {
        max-width: 75%;
    }
}
@media (min-width: 1800.00px) and (max-width: 1999.99px) {
    .btn-rep-box {
        max-width: 80%;
    }
}
@media (min-width: 2000.00px) and (max-width: 2199.99px) {
    .btn-rep-box {
        max-width: 82%;
    }
}
@media (min-width: 2200.00px) and (max-width: 2399.99px) {
    .btn-rep-box {
        max-width: 85%;
    }
}
