@import url('../lib/open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --b-vertical-bar-width: 260px !important; /* Set the width of the vertical sidebar (main menu). */
}

/* START Typography */
.h1, h1 {
    font-size: 2rem;
}

.h2, h2 {
    font-size: 1.75rem;
}

.h3, h3 {
    font-size: 1.5rem;
}

.h4, h4 {
    font-size: 1.25rem;
}

.h5, h5 {
    font-size: 1rem;
}

.h6, h6 {
    font-size: 0.9rem;
}

a, .btn-link {
    color: #0366d6;
}

.card-header h2, .card-header h3, .card-header h4, .card-header h5 {
    margin: 0;
}

/* END Typography */

/* START Page header */
.b-layout-header {
    border-color: rgba(0,0,0,.125);
}
/* END Page header */

app {
    position: relative;
    display: flex;
    flex-direction: column;
}

.top-row {
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.main {
    flex: 1;
}

    .main .top-row {
        background-color: #f7f7f7;
        border-bottom: 1px solid #d6d5d5;
        justify-content: flex-end;
    }

        .main .top-row > a, .main .top-row .btn-link {
            white-space: nowrap;
            margin-left: 1.5rem;
        }

        .main .top-row a:first-child {
            overflow: hidden;
            text-overflow: ellipsis;
        }

.card {
    box-shadow: 0 3.2px 7.2px 0 #ddd;
}

.card-header {
    background-color: transparent;
}

/* Hide the carrot symbol in the navbar, when the .hide-carrot class is added. Useful when using only icons as dropdown toggles. */
.dropdown-toggle.hide-carrot::after {
    display: none;
}

.navbar.b-bar-vertical-inline {
    font-size: 0.95rem;
    border-color: rgba(0,0,0,.125);
}

    /* Fixed width sidebar icons. Otherwise they do not align perfectly. This is the same as setting Bootstrap class fa-fw (fixed width). */
    .navbar.b-bar-vertical-inline .b-bar-icon {
        text-align: center;
        width: 1.25em;
    }

/* Styling for the sidebar logo when using organization logo. */
.navbar-brand img.logo {
    max-width: 6em;
    max-height: 2em;
}

/* Hide the sidebar organization logo when the sidebar is collapsed. This is normally done by setting font-size to 0, but
    since the logo is an <img> this is not configured by default.
*/
.navbar[data-collapse=small] .logo-wrapper {
    display: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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;
    }

/* Circle surrounding text, background and text color must be set seperately  */
.text-circle {
    justify-content: center;
    align-items: center;
    border-radius: 100%;
    text-align: center !important;
    display: flex;
    padding: 15px;
    font-size: 15px;
    width: 35px;
    height: 35px;
}

@media (min-width: 768px) {
    app {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .main .top-row {
        position: sticky;
        top: 0;
    }

    .main > div {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

    .navbar-toggler {
        display: none;
    }

    .navbar-search-input {
        min-width: 300px;
    }

    .sidebar .collapse {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }
}

/* Hide the box-shadow surrounding buttons when they have focus */
button:focus {
    box-shadow: none !important;
}


/**
    RAZOR COMPONENT SPECIFIC CSS. TO BE MOVED TO ISOLATED CSS FILES WHEN CSS ISOLATION IS AVAILABLE (.NET 5)
*/
/* START LoadingComponent */
.spinner {
    border: 8px solid silver;
    border-top: 8px solid #337AB7;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 700ms linear infinite;
    top: 40%;
    left: 55%;
    position: absolute;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 767.98px) {
    .main .top-row:not(.auth) {
        display: none;
    }

    .main .top-row.auth {
        justify-content: space-between;
    }

    .main .top-row a, .main .top-row .btn-link {
        margin-left: 0;
    }
}
/* END LoadingComponent */

/* START ImageUpload */
.dropzone {
    border: 3px dashed steelblue;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.2);
    color: #444;
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
}

    .dropzone:hover {
        background-color: #f3f3f3;
        color: #333;
    }

    /* .dropzone:hover::after {
            content: "Drop"
        }*/

    .dropzone input[type=file] {
        position: absolute;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

.dropzone-drag {
    background-color: palegreen;
}
/* END ImageUpload */

/* START MapRevisionEditor */
.bg-add {
    background-color: rgba(56,255,56,.2);
}

.bg-remove {
    background-color: rgba(255,0,0,.2);
}

/* Allow new lines on multi-line tooltips*/
[data-tooltip]:not(.is-loading).b-tooltip-multiline::before, [data-tooltip]:not(.is-disabled).b-tooltip-multiline::before, [data-tooltip]:not([disabled]).b-tooltip-multiline::before {
    white-space: pre-wrap;
}
/* END MapRevisionEditor */

/* START: Fix for headings behind top app bar when clicking on nav links in course outline editor */
h1 {
    scroll-margin-top: 4rem;
}
/* END: Fix for headings behind top app bar when clicking on nav links in course outline editor */


/* START Table with sticky header/headings. */
.table-sticky-header {
}

    .table-sticky-header thead th {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .table-sticky-header table {
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
    }

    .table-sticky-header th {
        background-color: var(--light);
    }

.table-sticky-header-horizontal {
}

    .table-sticky-header-horizontal th:first-child,
    .table-sticky-header-horizontal td:first-child {
        position: sticky;
        left: 0;
        background-color: var(--light);
    }

    .table-sticky-header-horizontal th {
        background-color: var(--light);
    }
/* END  Table with sticky header/headings. */

/* Dropdown Icons */
/* Ensure all icons within dropdown menus have fixed width and margin so that dropdown items are perfectly aligned. */
.dropdown-item i {
    text-align: center;
    width: 1.25em;
    margin-right: 0.5em;
}
/* END Dropdown Icons */

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
    z-index: 1;
}

::-webkit-scrollbar-thumb {
    background: #bfbfbf;
    border-radius: 1px;
}

::-webkit-scrollbar-track {
    background: transparent;
}
/* END Scrollbar */


/* START Html Diff */
ins {
    background-color: #cfc;
    text-decoration: inherit;
}

del {
    color: #999;
    background-color: #FEC8C8;
}

ins.mod {
    background-color: #FFE1AC;
}
/* END Html Diff */

/* START Badge/count for icons */
.has-badge[data-count]:after {
    position: absolute;
    right: -5%;
    top: 1%;
    content: attr(data-count);
    font-size: 72%;
    padding: .4em;
    border-radius: 999px;
    line-height: .75em;
    color: white;
    background: rgba(255,0,0,.9);
    text-align: center;
    min-width: 1.6em;
    font-weight: bold;
}
/* END Badge/count for icons */

/* Prevent dropdown items (e.g. on the navbar) from highlighting when they contain links to the 
    current page ('active' class is applied b */
.dropdown-item.active.no-active {
    color: inherit;
    background-color: transparent;
}
/*END */

.dropdown-item.visible-text {
    color: #000 !important; /* Black text for visibility */
    background-color: transparent; /* No background */
}

.dropdown-item.remove-background {
    background-color: transparent !important; /* Remove background */
    color: inherit; /* Keep the text color consistent */
}

.dropdown-item.remove-background:active,
.dropdown-item.remove-background.active {
    background-color: transparent !important; /* Ensure no background on active state */
    color: inherit !important; /* Ensure text color is not overridden */
}


/* This prevents the sidebar items near the bottom of the window (MainLayout) from going off screen when
    the sidebar is collapsed to small size**/
.b-bar-vertical-inline .b-bar-end .b-bar-item {
    position: relative;
}

.b-bar-vertical-inline[data-collapse=small] .b-bar-end .b-bar-dropdown .b-bar-dropdown-menu-container {
    bottom: 0;
}
/* END */

/* Annotated heading rule is a horizonal line similar to an <hr> element, only text may be placed in the center. */
.annotated-heading-rule {
    width: 100%;
    display: flex;
    flex-direction: row;
    text-transform: uppercase;
    border: none;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray);
}

    .annotated-heading-rule:after, .annotated-heading-rule:before {
        content: "";
        border-bottom: 1px solid var(--gray);
        flex: 1 0 auto;
        height: 0.5em;
        margin: 0;
    }

    .annotated-heading-rule span {
        text-align: center;
        flex: 0.2 0 auto;
        margin: 0;
        line-height: 1.15;
    }
/* END */

/* Retain standard font size and padding on large size elements. */
.btn-lg {
    font-size: 1.0rem;
    padding: 1.0rem 1.0rem;
}

.form-control-lg {
    font-size: 1.0rem;
    height: 3.5rem;
}

/* END */

/* Style any html markup that was originally created with a rich text editor by a user.  */
.injected-html p {
    margin-bottom: 0;
}
/* END */

/* QuilJS (Blazorise.RichTextEdit) config */
.ql-editor {
    max-height: 700px;
    overflow: auto;
}
/* END */

/* START:  Drag and Drop */
.b-drop-zone .draggable-placeholder {
    outline: 2px dashed blue !important;
    padding: 1rem;
}
/* END:  Drag and Drop */

/* START:  Configure initially hidden container to reveal when hovered over by mouse */
.action-group-hover {
    visibility: hidden;
}

    .b-drop-zone-draggable:hover .action-group-hover, .action-group-hover:hover {
        visibility: visible;
    }

/* END:  Configure initially hidden container to reveal when hovered over by mouse */

.icon-card {
}

.icon-card a {
    text-align: center;
}
    .icon-card .icon-label {
        width: 10rem;
    }
