// Include any default variable overrides here (though functions won't be available)

$font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
"Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;

@import "~bootstrap";
@import "~bootstrap-vue-next/dist/bootstrap-vue-next.css";

@import "@fortawesome/fontawesome-free/css/all.min.css";

// Then add additional custom code here

.alert-debug {
    color: black;
    background-color: white;
    border-color: #d6e9c6;
}

.alert-error {
    color: #b94a48;
    background-color: #f2dede;
    border-color: #eed3d7;
}

.spinner {
    width: 20px;
    height: 20px;
    background-color: #333;
    position: relative;
    float: left;

    border-radius: 100%;
    -webkit-animation: sk-scaleout 1.0s infinite ease-in-out;
    animation: sk-scaleout 1.0s infinite ease-in-out;
}

@-webkit-keyframes sk-scaleout {
    0% {
        -webkit-transform: scale(0)
    }
    100% {
        -webkit-transform: scale(1.0);
        opacity: 0;
    }
}

@keyframes sk-scaleout {
    0% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }
    100% {
        -webkit-transform: scale(1.0);
        transform: scale(1.0);
        opacity: 0;
    }
}

input.checkbox-color:checked + span:after {
    background: currentColor;
    border: currentColor;
}

input.checkbox-color:checked + span:before {
    background: currentColor;
    border: currentColor;
}

input.checkbox-color-design:checked + span:after {
    background: black;
}

.surface-summary-plot {
    height: 400px;
    text-align: left; /** this is only needed in surface detail, don't know why */
}

.surface-summary-plot .light-label text.text-line {
    font-size: large;
}

.welcome-page-statistics {
    font-size: xx-large;
}

.surface-category-headline {
    font-size: small;
}

.shared-by-badge, .published-by-badge {
    font-size: small;
}

.btn:active {
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}

.btn {
    white-space: normal; /** we want the text in buttons wrap if the windows is made smaller, issue 272 */
}

.highlight {
    background-color: yellow;
}

/** Improve layout of notifications a bit */
div.live_notify_list {
    /** inline-size: min-content; */
    overflow-wrap: break-word;
    overflow-inline: auto;
    width: 600px;
}

/** Workaround for problem with django-tagolous and crispy forms
 See https://github.com/radiac/django-tagulous/issues/35
 */
.select2-container-multi .select2-choices {
    background-image: linear-gradient(to bottom, #eee0 1%, #f3f3f300 15%) !important;
    border: none !important;
    background-color: transparent !important;
}

/** make chevrons for showing topographies in surface list tree larger, GH #381 */
span.fancytree-node > span.fancytree-expander {
    font-size: large;
    vertical-align: baseline;
    margin-right: 20px;
}


span.fancytree-node > span.fancytree-title {
    font-size: larger;
    vertical-align: middle;
    margin-right: 20px;
}


span.fancytree-checkbox {
    /** padding-top: 1%; */
    font-size: large;
    line-height: 50%;
    /** display: table-cell; */
    vertical-align: middle !important;
    /** line-height: 1;*/
    margin-right: 20px;
}

tr.fancytree-active {
    background-color: var(--light) !important;
    /*color: white !important;*/
}

/**
  Settings for task table
*/

.task-table {
    width: 100%;
    table-layout: fixed;
}

td.ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
}

/** Thanks to user Christina on SO, see https://stackoverflow.com/a/25859829/10608001 */
@media (min-width: 992px) {
    .modal-xl {
        width: 90%;
        max-width: 1200px;
    }
}

/** Checkboxes in analyses plot */
.topobank-subject-checkbox div.bk-input-group {
    overflow: hidden;
    text-overflow: ellipsis; /** this does not work here, don't know why */
}

.topobank-surface-checkbox div.bk-input-group span {
    font-weight: bold;
}

/** bokeh's "primary" color should be same as bootstrap's */
div.bk-btn-group button.bk-btn-primary {
    background-color: $primary;
    border-color: $primary;
}

div.bk-btn-group button.bk-btn-primary:hover {
    background-color: $primary;
    border-color: $primary;
}

/** Extra (dynamic) tabs */
.nav-tabs {
    z-index: 1000;
}

.fixed-top-2 {
    margin-top: 56px;
    z-index: 1000;
}

/*
.fixed-top-3 {
  margin-top: 98px;
  z-index: 1000;
}
*/

html, body {
    height: 100%;
}

body {
    padding-top: 105px; /* choose sth like 162px when using fix-top-3 */
    display: flex;
    flex-direction: column;
}

/** Animate search bar */
#global-search {
    width: 162px;
    -webkit-transition: width 0.4s ease-in-out;
    transition: width 0.4s ease-in-out;
}

/** When the input field gets focus, change width of search bar to 100% */
#global-search:focus-within {
    width: 100%;
}

#global-search-input {
    border-radius: 5px 0px 0px 5px; /* left side should be round */
}

/** More visible status node in fancytree while loading .. */
#tree-loading-indicator {
    font-size: x-large;
}

/** larger font in basket elements */
.basket-element {
    font-size: medium;
}


/** showing topographies */
.carousel-inner img {
    margin: auto;
}

.carousel-caption {
    position: relative;
    left: 0;
    top: 0;
}

/** improve readability of terms document */
section[title="Terms and Conditions"] div.toc-container, #tc-terms-html {
    width: 65%;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased !important;
    -moz-font-smoothing: antialiased !important;
    text-rendering: optimizelegibility !important;
    letter-spacing: .03em;
}

/** improve bandwidth plot */
.bandwidth-hover-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bandwidth-hover-box img {
    float: right;
    margin: 0px 15px 0px 0px;
}

.bandwidth-hover-box span {
    font-size: large;
}

/** vertical navigation */
.nav-pills-custom .nav-item {
    margin-bottom: 0.5rem;
}

.nav-pills-custom .nav-fill {
    width: 15rem;
}

.nav-pills-custom .nav-link {
    width: 100%;
    background: $white;
    position: relative;
    border: 1px solid $primary-border-subtle;
}

.nav-pills-custom .nav-link.active {
    background: $primary;
    border: 1px solid $primary;
}

/* Add indicator arrow for the active tab */
@media (min-width: 992px) {
    .nav-pills-custom .nav-link::before {
        content: '';
        display: block;
        border-top: 8px solid transparent;
        border-left: 10px solid $primary;
        border-bottom: 8px solid transparent;
        position: absolute;
        top: 50%;
        right: -8px;
        transform: translateY(-50%);
        opacity: 0;
    }
}

.nav-pills-custom .nav-link.active::before {
    opacity: 1;
}

/* lined tabs */

.lined-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
}

.lined-tabs .nav-link:hover {
    border: none;
    border-bottom: 3px solid transparent;
}

.lined-tabs .nav-link.active {
    background: none;
    color: #555;
    border-color: #2b90d9;
}

.bk-root {
    font-size: 1rem !important;
}

.bk-btn {
    font-size: 1rem !important;
}

.bk-tab {
    font-size: 1rem !important;
}


/** Container for deep zoom images */

.dzi-container {
    display: flex;
    align-items: stretch;
    flex-direction: row;
}

.dzi-view {
    float: left;
    width: calc(100% - 1em);
    aspect-ratio: 4 / 3;
}

.dzi-colorbar {
    width: 8em;
    margin-left: 5px;
    float: right;
}


/** Color bars for deep zoom image views */

.dzi-colorbar-column {
    margin-left: 5px;
    width: 20px;
    height: 300px;
    float: left;
    position: relative;
}

.background-viridis {
    background: linear-gradient(to top, #440154, #48186a, #472d7b, #424086, #3b528b, #33638d, #2c728e, #26818e, #21908c, #1f9f88, #28ae80, #3ebc74, #5dc963, #82d34c, #abdc32, #d5e21a, #fde725);
}

.dzi-colorbar-tick {
    background: black;
    height: 1px;
    width: 5px;
    right: 0px;
    position: absolute;
    transform: translateY(-50%);
}

.dzi-colorbar-text {
    justify-content: center;
    align-items: center;
    position: absolute;
    transform: translateY(-50%);
}

.dzi-colorbar-title {
    align-content: center;
}

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

.card-footer {
    background-color: unset;
}

/**
 * Settings for the Find & select results tree
 */

.select-tree-title {
    font-size: medium;
    font-weight: bold;
}

.select-tree-authors {
    font-size: medium;
    color: var(--secondary);
}

/* The following cuts the description text after 3 display lines */
.select-tree-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fancytree-active .select-tree-authors {
    font-size: medium;
    /* color: white; */
}

.fancytree-active .select-tree-authors a {
    font-size: medium;
    /* color: white; */
}

.select-tree-item p {
    margin-bottom: 0.3rem;
}

.select-tree-info {
    color: var(--secondary);
}

.fancytree-active .select-tree-info {
    /* color: white; */
}

.surface-tree thead {
    display: none;
}

.create-twin-button {
    width: 100em;
}

.surface-tree {
    table-layout: fixed;
}

.dot {
    width: 1em;
    height: 1em;
    background-color: #333;
    position: relative;
    float: left;
    border-radius: 100%;
    top: 0.3em; /* to center the dot, there is probably a better way to do this */
    margin-right: 0.5em;
}

.plot-controls-card-header {
    padding: 0px;
}

.plot-controls-card-body {
    padding: 3px 12px;
}

/*!
 * Start Bootstrap - SB Admin 2 v5.0.0 (https://startbootstrap.com/template-overviews/sb-admin-2)
 * Copyright 2013-2018 Start Bootstrap
 * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-sb-admin/blob/master/LICENSE)
 */

html {
    //position: relative;
    min-height: 100%;
}

body {
    height: 100%;
}

#wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    flex: 1 0 auto;
}

#wrapper #content-wrapper {
    overflow-x: hidden;
    width: 100%;
    padding-top: 1rem;
    padding-bottom: 80px;
}

body.fixed-nav #content-wrapper {
    margin-top: 56px;
    padding-left: 90px;
}

body.fixed-nav.sidebar-toggled #content-wrapper {
    padding-left: 0;
}

@media (min-width: 768px) {
    body.fixed-nav #content-wrapper {
        padding-left: 225px;
    }
    body.fixed-nav.sidebar-toggled #content-wrapper {
        padding-left: 90px;
    }
}

.scroll-to-top {
    position: fixed;
    right: 15px;
    bottom: 15px;
    display: none;
    width: 50px;
    height: 50px;
    text-align: center;
    color: #fff;
    background: rgba(52, 58, 64, 0.5);
    line-height: 46px;
}

.scroll-to-top:focus, .scroll-to-top:hover {
    color: white;
}

.scroll-to-top:hover {
    background: #343a40;
}

.scroll-to-top i {
    font-weight: 800;
}

.smaller {
    font-size: 0.7rem;
}

.o-hidden {
    overflow: hidden !important;
}

.z-0 {
    z-index: 0;
}

.z-1 {
    z-index: 1;
}

.navbar-nav .form-inline .input-group {
    width: 100%;
}

.navbar-nav .nav-item.active .nav-link {
    color: $primary;
}

.navbar-nav .nav-item.dropdown .dropdown-toggle::after {
    width: 1rem;
    text-align: center;
    float: right;
    vertical-align: 0;
    border: 0;
    font-weight: 900;
    content: '\f105';
    font-family: 'Font Awesome 5 Free';
}

.navbar-nav .nav-item.dropdown.show .dropdown-toggle::after {
    content: '\f107';
}

.navbar-nav .nav-item.dropdown.no-arrow .dropdown-toggle::after {
    display: none;
}

.navbar-nav .nav-item .nav-link:focus {
    outline: none;
}

.navbar-nav .nav-item .nav-link .badge {
    position: absolute;
    margin-left: 0.75rem;
    top: 0.3rem;
    font-weight: 400;
    font-size: 0.5rem;
}

@media (min-width: 768px) {
    .navbar-nav .form-inline .input-group {
        width: auto;
    }
}

@media (min-width: 768px) {
    .sidebar {
        width: 225px !important;
    }
    .sidebar .nav-item .nav-link {
        display: block;
        width: 100%;
        text-align: left;
        padding: 1rem;
        width: 225px;
    }
    .sidebar .nav-item .nav-link span {
        font-size: 1rem;
        display: inline;
    }
    .sidebar .nav-item .dropdown-menu {
        position: static !important;
        margin: 0 1rem;
        top: 0;
    }
    .sidebar .nav-item.dropdown .dropdown-toggle::after {
        display: block;
    }
    .sidebar.toggled {
        overflow: visible;
        width: 90px !important;
    }
    .sidebar.toggled .nav-item:last-child {
        margin-bottom: 1rem;
    }
    .sidebar.toggled .nav-item .nav-link {
        text-align: center;
        padding: 0.75rem 1rem;
        width: 90px;
    }
    .sidebar.toggled .nav-item .nav-link span {
        font-size: 0.65rem;
        display: block;
    }
    .sidebar.toggled .nav-item .dropdown-menu {
        position: absolute !important;
        -webkit-transform: none !important;
        transform: none !important;
        left: calc(90px + 0.5rem) !important;
        margin: 0;
    }
    .sidebar.toggled .nav-item .dropdown-menu.dropup {
        bottom: 0;
        top: auto !important;
    }
    .sidebar.toggled .nav-item.dropdown .dropdown-toggle::after {
        display: none;
    }
}

.sidebar.fixed-top {
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.card-body-icon {
    position: absolute;
    z-index: 0;
    top: -1.25rem;
    right: -1rem;
    opacity: 0.4;
    font-size: 5rem;
    -webkit-transform: rotate(15deg);
    transform: rotate(15deg);
}

@media (min-width: 576px) {
    .card-columns {
        -webkit-column-count: 1;
        column-count: 1;
    }
}

@media (min-width: 768px) {
    .card-columns {
        -webkit-column-count: 2;
        column-count: 2;
    }
}

@media (min-width: 1200px) {
    .card-columns {
        -webkit-column-count: 2;
        column-count: 2;
    }
}

.card-login {
    max-width: 25rem;
}

.card-login .custom-control-label::before {
    background-color: rgba(0, 0, 0, 0.215)
}

.card-login .login-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 16px;
    color: inherit;
}

.login-panel {
    margin-top: 25%;
}

.card-register {
    max-width: 40rem;
}

/*
.form-label-group {
    position: relative;
}
 */

.form-label-group > input, .form-label-group > label {
    padding: var(--input-padding-y) var(--input-padding-x);
    height: auto;
}

.form-label-group > label {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    margin-bottom: 0;
    /* Override default `<label>` margin */
    line-height: 1.5;
    color: #495057;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    -webkit-transition: all 0.1s ease-in-out;
    transition: all 0.1s ease-in-out;
}

.form-label-group input::-webkit-input-placeholder {
    color: transparent;
}

.form-label-group input:-ms-input-placeholder {
    color: transparent;
}

.form-label-group input::-ms-input-placeholder {
    color: transparent;
}

.form-label-group input::placeholder {
    color: transparent;
}

.form-label-group input:not(:placeholder-shown) {
    padding-top: calc(var(--input-padding-y) + var(--input-padding-y) * (2 / 3));
    padding-bottom: calc(var(--input-padding-y) / 3);
}

.form-label-group input:not(:placeholder-shown) ~ label {
    padding-top: calc(var(--input-padding-y) / 3);
    padding-bottom: calc(var(--input-padding-y) / 3);
    font-size: 12px;
    color: #777;
}

footer.sticky-footer {
    height: 80px;
    background-color: white;
}

footer.sticky-footer .copyright {
    line-height: 1;
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    footer.sticky-footer {
        /* width: calc(100% - 225px); use this with sidebar */
        width: 100%;
    }
}

body.sidebar-toggled footer.sticky-footer {
    width: 100%;
}

@media (min-width: 768px) {
    body.sidebar-toggled footer.sticky-footer {
        width: calc(100% - 90px);
    }
}

.bg-light {
    background-color: #f8f8f8;
    border-color: #e7e7e7;
}

.card-default {
    border-color: #ddd;
}

.card-default > .card-header {
    color: $dark;
    background-color: $white;
    border-color: $secondary-border-subtle;
}

.btn-default {
    color: $dark;
    background-color: $white;
    border-color: $secondary-border-subtle;
}

.navbar-expand .navbar-nav .alerts-dropdown {
    min-width: 20em;
}

.navbar-expand .navbar-nav .alerts-dropdown {
    line-height: 1.42857143;
    color: #333;
    word-wrap: break-word !important;
    white-space: normal;
    font-size: 10px !important;
}

#mark-all-as-read-btn {
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.42857143;
    padding-bottom: 32px;
    width: 237px;
    vertical-align: -26px;
    font-size: inherit;
}

#notification-msg {
    word-wrap: break-word !important;
    word-break: break-word;
    max-width: fit-content !important;
    display: block !important;
    color: blue;
}

.navbar-expand .navbar-nav .alerts-dropdown .dropdown-divider {
    border-top: 1px solid #e5e5e5;
}

.bd-title {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

@media (min-width: 576px) {
    .bd-title {
        font-size: 3rem
    }
}

/*side bar css*/
.sidepanel-bell-icon {
    background: none;
    border: none;
}

.notification-icon {
    color: rgba(255, 255, 255, .5) !important;
}

.sidepanel-wrapper {
    float: right;
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar-main {
    display: none;
}

#sidebar {
    background-color: #343840 !important;
    color: #090808;
    font-size: 16px;
    transition: transform 0.3s ease-out;
    min-width: 250px;
    max-width: 258px;
    position: fixed;
    top: 56px;
    right: 0;
    bottom: 0;
    z-index: 999;
    overflow-x: clip;
    overflow-y: scroll;
    padding: 12px;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.5px;
    border: 1px solid #b8daff;
}

#sidebar ul p {
    color: #fff;
    padding: 10px;
}

#sidebar ul li a {
    padding: 10px;
    display: block;
    color: #080909;
    width: 233px;
    text-align: center;
    background-color: #e7e7e7;
}

#information-content, #user-profile-details-content, #notification-content {
    display: none;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid white;
}

.sidebar-main-block {
    display: block !important;
    transition: ease-in;
    transition-duration: 0.3s;
}

.info-block {
    display: block !important;
}

.notification-block {
    display: block !important;
}

.user-block {
    display: block !important;
}

.notification-item {
    display: block;
    width: 250px;
    word-break: break-word !important;
    text-wrap: normal;
    word-wrap: break-word !important;
    border-bottom: 1px solid white;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: 5px;
}

.drop-zone {
    border: dashed 1px $secondary;
    width: 100%;
    padding-top: 3rem;
    padding-bottom: 3rem;
    text-align: center;
}

.drop-zone-active {
    background-color: $light;
}

/* Remove up/down arrows on numeric input fields.
   From: https://www.w3schools.com/howto/howto_css_hide_arrow_number.asp
 */

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}


/* Fix width of the unit selection box */
.unit-select {
    max-width: 5rem;
}
