﻿html {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

body, #app {
    width: 100%;
    height: 100%;
    flex: 1 0 100%;
    flex-direction: column;
    font-size: 16px;
    background-color: var(--mud-palette-background);
}

.bki-layout {
    width: 100%;
    height: 100%;
    flex: 1 0 100%;
    flex-direction: column;
}

.w-100 {
    width: 100% !important;
}

.h-100 {
    height: 100% !important;
}

.h-auto {
    height: auto !important;
}

.bki-appbar {
    border-bottom: 1px solid var(--mud-palette-primary-darken);
    color: var(--mud-palette-surface);
}

.bki-resizable {
    resize: both;
    overflow: auto;
}

.bki-bordered {
    border: 1px solid var(--mud-palette-primary);
    border-radius: var(--mud-default-borderradius);
    background-color: var(--mud-palette-surface);
}

    .bki-bordered.no-border-top {
        border-top: none;
    }

.bki-brand {
    color: var(--mud-palette-primary-text) !important;
    display: inline-flex;
    align-items: center;
    font-family: var(--mud-typography-button-family);
    font-size: var(--mud-typography-button-size);
    font-weight: var(--mud-typography-button-weight);
    line-height: var(--mud-typography-button-lineheight);
    letter-spacing: var(--mud-typography-button-letterspacing);
}

.bki-thing-main {
    /*    top: 0px;
    right: 0px;
    bottom: 10px;
    left: 0px;
    z-index: 0;
    position: absolute;*/
    width: 100%;
    height: 86vh !important;
    max-height: 100%;
    /*    overflow: hidden;*/
}

.bki-filters {
    height: 60vh !important;
}

.bki-filter-label .mud-typography.mud-typography-body1 {
    font-size: 0.9rem;
    width: 100%;
    white-space: nowrap;
}

.bki-filter-label .mud-checkbox-dense {
    padding-left: 0;
}

.bki-filter-label .mud-icon-button:hover, .mud-icon-button:focus-visible {
    background-color: transparent;
}

.bki-table.bki-table-searchresults > .mud-table-container {
    height: 69vh !important;
}

/* A little hacky, but needed for ellipsis to work in table cells */
.bki-table .mud-table-cell {
    max-width: 0;
}

.bki-crumb {
    color: var(--mud-palette-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    cursor: pointer;
    font-weight: 500;
}

    .bki-crumb:hover {
        color: #000;
    }

.bki-crumb-spacer:nth-last-of-type(1) {
    display: none;
}

.bki-caption-above {
    font-size: 0.85em;
    margin-bottom: -6px;
}

.bki-caption-below {
    font-size: 0.85em;
    /*margin-top: -4px;*/
}

.bki-property-below {
    font-size: 1em;
    margin-top: 4px;
}

.bki-property-below-subcategory {
    font-size: 0.9em;
    margin-left: 8px;
}

.bki-list-item-nomenclatur {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
    margin-bottom: -8px;
    font-size: 0.9em;
}

.bki-caption-label {
}

    .bki-caption-label.indented, .bki-caption-above.indented, .bki-caption-below.indented {
        margin-left: 10px;
    }

.bki-concept-relation {
    max-height: 200px;
    overflow-y: auto;
}

.bki-bgcolor-cream {
    background-color: rgba(var(--mud-palette-tertiary-rgb),0.3);
}

.bki-bgcolor-ocean {
    background-color: rgba(var(--mud-palette-primary-rgb),0.04);
}

.bki-gradient-top-left-grey {
    background: var(--mud-palette-surface); /* Old browsers */
    background: linear-gradient(170deg, var(--mud-palette-background) 0%, var(--mud-palette-surface) 10%);
}

.bki-tabs {
    /*    max-height: 90vh;
    overflow: hidden;
    z-index: var(--mud-zindex-drawer);
    position: -webkit-sticky;
    position: sticky;
    top: 48px;*/
    height: 92vh !important;
}

    .bki-tabs > .mud-tabs-toolbar .mud-tabs-toolbar-inner {
        min-height: 34px;
    }

    .bki-tabs .mud-tab {
        min-height: 34px;
        justify-content: start;
        padding: 3px 10px;
        border-right: 1px solid var(--mud-palette-surface);
        align-items: center;
        display: flex;
        font-family: var(--mud-typography-button-family);
        font-size: var(--mud-typography-button-size);
        font-weight: var(--mud-typography-button-weight);
        line-height: var(--mud-typography-button-lineheight);
        letter-spacing: var(--mud-typography-button-letterspacing);
        text-transform: var(--mud-typography-button-text-transform);
    }

        .bki-tabs .mud-tab > .mud-icon-size-medium {
            font-size: 1.2rem;
        }

        .bki-tabs .mud-tab.mud-tab-active {
            background-color: var(--mud-palette-primary-lighten);
            /*border-bottom: 1px solid var(--mud-palette-primary-darken);*/
        }

    /* Section for classes when Navigator is collapsed - scope: .bki-tabs.bki-navigator-is-collapsed */
    .bki-tabs.bki-navigator-is-collapsed {
        /*overflow: auto;*/
        font-size: 0.9rem !important;
    }

        .bki-tabs.bki-navigator-is-collapsed .mud-tabs-scroll-button {
            display: none;
        }

        .bki-tabs.bki-navigator-is-collapsed .mud-tab {
            min-width: 50px;
            line-height: 1;
            justify-content: start;
        }

        .bki-tabs.bki-navigator-is-collapsed .mud-table-container {
            overflow: visible;
        }

        .bki-tabs.bki-navigator-is-collapsed .mud-treeview {
            overflow: visible;
        }

        .bki-tabs.bki-navigator-is-collapsed .mud-treeview-dense .mud-treeview-item-content {
            padding-left: 0;
        }

        .bki-tabs.bki-navigator-is-collapsed .mud-treeview-item-arrow {
            width: 1rem;
            margin-left: 0;
            justify-content: start;
        }

        .bki-tabs.bki-navigator-is-collapsed .mud-treeview-item .mud-treeview-item-arrow > .mud-icon-button {
            padding-left: 0;
        }

        .bki-tabs.bki-navigator-is-collapsed .mud-treeview-item p.mud-treeview-item-label {
            white-space: nowrap;
            font-size: 0.9rem !important;
        }

        .bki-tabs.bki-navigator-is-collapsed .mud-typography {
            font-size: 0.9rem !important;
        }
/* End section for Navigator is collapsed */

.bki-expand-collapse-button {
    position: absolute;
    right: 11px;
    top: 10px;
    background-color: #fefefe;
    border: 1px solid var(--mud-palette-primary);
    z-index: 1110; /* Tab is 1100 */
    width: 30px;
    height: 30px;
    min-height: 30px;
}

    .bki-expand-collapse-button:hover {
        background-color: var(--mud-palette-tertiary-darken);
    }


.bki-fit-select > .mud-select {
    width: 85% !important;
}

.bold {
    font-weight: bold;
}

.boldish {
    font-weight: 500;
}

small {
    font-size: 0.85em; /* note EM */
    font-weight: normal;
}

smaller {
    font-size: 0.78em; /* note EM */
    font-weight: normal;
}

.small {
    font-size: 0.9rem; /* note REM */
}

.smaller {
    font-size: 0.8rem; /* note REM */
}

    .small > .mud-icon-button-size-small .mud-icon-size-small,
    .smaller > .mud-icon-button-size-small .mud-icon-size-small {
        font-size: 0.9rem !important;
    }

.transparent {
    background-color: transparent !important;
}

.text-align-left {
    text-align: left;
}

.text-align-center {
    text-align: center;
}

.text-align-right {
    text-align: right;
}

.clickable {
    cursor: pointer;
}

    .clickable.hover {
        background-color: var(--mud-palette-surface);
        border: 1px solid var(--mud-palette-surface);
    }

        .clickable.hover > * {
            background-color: transparent !important;
        }

        .clickable.hover:hover {
            background-color: var(--mud-palette-table-hover) !important;
            border: 1px solid var(--mud-palette-lines-default);
        }

.bki-text-grey {
    color: var(--mud-palette-grey-default);
}

.no-break {
    white-space: nowrap;
}

    .no-break.hide-overflow {
        overflow: hidden;
    }

.navigator-results-header button.mud-icon-button {
    padding: 4px !important;
}

/* OVERRIDE MUD CLASSES */

/* Height will cut the element (background color) when scrolling vertically. Min-height is more flexible */
.mud-simple-table.mud-table-sticky-header .mud-table-container {
    max-height: inherit;
}

a.mud-nav-link, div.mud-nav-link {
    padding: 8px;
}

.mud-table-pagination .mud-table-pagination-toolbar {
    height: 38px;
}

.mud-table-pagination .mud-table-pagination-actions > .mud-button-root.mud-icon-button {
    padding: 0 4px;
}

.bki-breadcrumbs {
    display: flex;
    flex-shrink: 0;
    flex-grow: 1;
    flex: 0 0 auto;
    outline: 0;
    z-index: var(--mud-zindex-drawer);
    flex-direction: column;
    color: var(--mud-palette-drawer-text);
    background-color: var(--mud-palette-drawer-background);
    --mud-drawer-content-height: 0;
    width: 100%;
    position: -webkit-sticky;
    position: sticky;
    top: 48px;
}

.bki-button-outlined-light {
    border-color: var(--mud-palette-lines-inputs);
    text-transform: none !important;
}

/* BLAZOR CLASSES */
#blazor-error-ui {
    background: #b32121;
    color: white;
    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;
        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zEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Ett fel har inträffat."
    }


/* graph view */
.node {
}

.link {
    stroke: #999;
    stroke-opacity: .6;
    stroke-width: 1px;
}

/* external html from other sources */
.external-html {
    margin-top: 6px;
}

    .external-html div {
        padding: 2px;
    }

    .external-html ul {
        margin-left: 18px;
        list-style-type: disc;
    }

/* Small description text for Code System information header */
.typography-small {
    line-height: 1.05;
    letter-spacing: 0.01em;
}

/* 
    nowrap/hidden/ellipsis typically needs that all its parents have explicitly set width, or else one of them will overflow x instead,
    but setting width: 100% of all descendants will make sibling divs take up an equal percentage instead of auto, so max-width is used.
*/

.bki-ellipsis div, .bki-ellipsis {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bki-start-splitter {
    background-color: var(--mud-palette-primary);
    height: 40vh;
    min-height: 300px !important;
    max-height: 330px !important;
    width: 100%;
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
}

.bki-start-header {
    color: var(--mud-palette-white);
}

.bki-start-input {
    /*background-color: var(--mud-palette-background);*/
    background-color: var(--mud-palette-surface);
    min-width: 200px;
}

.bki-start-input input.mud-input-root-outlined.mud-input-root-margin-dense,
.bki-start-input .mud-input-slot.mud-input-root-outlined.mud-input-root-margin-dense {
    padding-top: 13px;
    padding-bottom: 13px;
}

.bki-start-card {
    height: 40vh;
    min-height: 330px;
    max-height: 400px;
}

.bki-start-icon {
    height: 6rem;
    width: auto;
    align-self: center;
}

.tirs-frontpage-ul {
    list-style-type: disc !important;
    margin-block-start: 0.4em;
    margin-block-end: 1em;
    margin-inline-start: 0;
    margin-inline-end: 0;
    padding-inline-start: 30px;
    padding: 0 0 0 30px;
    margin: 0.4em 0 1em 0;
}

.bki-about-paragraph-separator .mud-typography.mud-typography-body1 {
    margin-bottom: 12px;
}

.mud-treeview-item > .mud-primary-text {
    color: var(--mud-palette-text-primary) !important;
}

.mud-treeview-item > .mud-treeview-item-selected {
    background-color: var(--mud-palette-table-hover) !important;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 5px;
}

.bki-context-menu {
    min-width: 125px;
}

.bki-context-menu.is-collapsed {
    min-width: 30px !important;
}

.bki-context-menu .mud-list-item-icon {
    min-width: 28px;
}

.bki-context-menu .mud-list-item {
    margin-bottom: 4px;
}

.bki-context-menu .mud-secondary-hover {
    border-radius: 15px;
}

.bki-context-menu .mud-list-item-clickable:hover {
    border-radius: 15px;
}

.bki-link-wrapper div.mud-paper {
    background-color: initial;
}

.bki-link-wrapper div.mud-menu > button {
    padding: 4px;
}

    .bki-link-wrapper div.mud-menu > button.mud-icon-button-size-small {
        padding: 0;
        font-size: inherit !important;
        line-height: inherit;
    }

        .bki-link-wrapper div.mud-menu > button.mud-icon-button-size-small .mud-icon-size-small {
            font-size: inherit !important;
            line-height: inherit;
        }

.bki-link-wrapper .bki-link-wrapper {
    line-height: inherit;
}

/* MEDIA QUERIES, WIDTH - always last */
/* xl */
@media only screen and (max-width: 2559px) {
    html, body, #app {
        font-size: 16px;
    }
}

/* lg */
@media only screen and (max-width: 1919px) {
    html, body, #app {
        font-size: 15px;
    }
}

/* md */
@media only screen and (max-width: 1279px) {
    html, body, #app {
        font-size: 14px;
    }
}

/* sm */
@media only screen and (max-width: 959px) {
    html, body, #app {
        font-size: 13px;
    }
}

/* xs */
@media only screen and (max-width: 599px) {
    .bki-start-input {
        min-width: 120px;
    }
}

/* xxs - custom bki */
@media only screen and (max-width: 399px) {
}

/* MEDIA QUERIES, HEIGHT - always last */

@media only screen and (max-height: 800px) {
    .bki-thing-main {
        height: 85vh !important;
    }

    .bki-tabs {
        height: 91vh !important;
    }

    .bki-filters {
        height: 56vh !important;
    }

    .bki-table.bki-table-searchresults > .mud-table-container {
        height: 66vh !important;
    }

    .bki-start-card {
        height: 45vh;
    }
}

@media only screen and (max-height: 700px) {
    .bki-thing-main {
        height: 82vh !important;
    }

    .bki-tabs {
        height: 89vh !important;
    }

    .bki-filters {
        height: 48vh !important;
    }

    .bki-table.bki-table-searchresults > .mud-table-container {
        height: 60vh !important;
    }
}

@media only screen and (max-height: 600px) {
    .bki-thing-main {
        height: 79vh !important;
    }

    .bki-tabs {
        height: 87vh !important;
    }

    .bki-filters {
        height: 40vh !important;
    }

    .bki-table.bki-table-searchresults > .mud-table-container {
        height: 54vh !important;
    }
}

@media only screen and (max-height: 530px) {
    .bki-thing-main {
        height: 76vh !important;
    }

    .bki-tabs {
        height: 85vh !important;
    }

    .bki-filters {
        height: 35vh !important;
    }

    .bki-table.bki-table-searchresults > .mud-table-container {
        height: 50vh !important;
    }
}
