html,
body {
    height: 100%;
}

/* Sidebar */

:root {
    --app-dark-1: #0f1724;
    --app-dark-2: #162235;
    --app-dark-3: #22324a;
    --app-dark-text: #d7e1f0;
    --app-dark-muted: #9aacc5;
    --app-accent: #4b8ff7;
}

.wrapper {
    min-height: 100dvh;
}

#sidebar.sidebar {
    background: linear-gradient(180deg, rgba(12, 20, 34, 0.96) 0%, rgba(20, 33, 52, 0.96) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    min-height: 100dvh;
}

#sidebar .sidebar-content,
#sidebar .sidebar-nav {
    background: transparent;
}

#sidebar .sidebar-brand,
#sidebar .sidebar-brand:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--app-dark-text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#sidebar .sidebar-header {
    color: var(--app-dark-muted);
    letter-spacing: .06em;
    text-transform: uppercase;
}

#sidebar .sidebar-link,
#sidebar a.sidebar-link {
    color: var(--app-dark-text);
    border: 1px solid transparent;
}

#sidebar .sidebar-link .fab,
#sidebar .sidebar-link .fal,
#sidebar .sidebar-link .far,
#sidebar .sidebar-link .fas,
#sidebar .sidebar-link svg,
#sidebar a.sidebar-link .fab,
#sidebar a.sidebar-link .fal,
#sidebar a.sidebar-link .far,
#sidebar a.sidebar-link .fas,
#sidebar a.sidebar-link svg {
    color: #9fc3ff;
}

#sidebar .sidebar-link:hover,
#sidebar a.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
}

#sidebar .sidebar-item.active .sidebar-link,
#sidebar .sidebar-item.active .sidebar-link:hover,
#sidebar .sidebar-item.active>.sidebar-link {
    background: linear-gradient(90deg, rgba(75, 143, 247, 0.22) 0%, rgba(75, 143, 247, 0.08) 100%);
    border-color: rgba(75, 143, 247, 0.45);
    color: #ffffff;
}

#sidebar .sidebar-footerlink,
#sidebar .created-by,
#sidebar .text-dark {
    color: var(--app-dark-muted) !important;
}

#sidebar .sidebar-footerlink:hover,
#sidebar .created-by:hover {
    color: #ffffff !important;
}


.sidebar .logo {
    max-width: 100px;

}

.sidebar .sidebar-footerlink {
    font-size: 11px;
    padding: 4px;
    padding-left: 20px;
}

.sidebar .created-by {
    font-size: 10px;
}

.sidebar .created-by img {
    max-width: 30px;
}

/* Topbar */
.navbar {
    display: none;
}

.sidebar-toggle {
    position: absolute;
    z-index: 99999999;
    top: 5px;
    left: 0;
}

.sidebar-toggle .hamburger,
.sidebar-toggle .hamburger::before,
.sidebar-toggle .hamburger::after {
    background: #959595;
}


/* Full screen page */
main.full-screen {
    width: 100%;
    margin-top: 0;
}

main.full-screen .container-fluid {
    width: 100%;
    margin: 0;
    padding: 0;
}

/** Map  **/
#map.dronerequest-map {
    top: 0;
    left: 0;
    height: 100vh;
}

#map.dronerequest-map.history-map {
    height: 600px;
}

.dronerequest-map #ui-datepicker-div {
    z-index: 9999 !important;
}

#droneoperator-map .icons-description,
.dronerequest-map .icons-description {
    margin-top: 2px;
    position: absolute;
    z-index: 999;
    right: 0;
    padding: 10px;
    border-radius: 0 0 0 10px;
    background-color: rgba(255, 255, 255, 0.8);
}

.dronerequest-map .icons-description .my-drone-icon {
    color: #2b82cb;
}

.dronerequest-map .icons-description .other-drone-icon::before {
    content: '';
    display: inline-block;
    background-image: url('../img/aircrafts/drone.png');
    background-size: contain;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.dronerequest-map .icons-description .area-icon {
    width: 10px;
    height: 10px;
    display: inline-block
}

.dronerequest-map .icons-description .area-icon.restricted-area {
    background: rgba(255, 20, 20, 0.197);
    border: 2px solid #d2595b;
}

.dronerequest-map .icons-description .area-icon.control-zone {
    background: rgba(0, 0, 0, 0.278);
    border: 2px solid #000000;
}

.dronerequest-map .icons-description .area-icon.drone-plan {
    background: rgba(0, 96, 231, 0.197);
    border: 2px solid #3b7ddd;
}

#droneoperator-map,
#drawpolygon-map {
    width: 100%;
    height: 50vh;
    min-height: 200px;
}

.sidebar.toggled {
    margin-left: 0;
}

/* Draw Polygon Map */
.leaflet-draw-actions a {
    background: rgba(43, 131, 203, 0.753) !important;
}


/* Login */

.login-page {
    min-height: 100dvh;
    background-image: url('../img/login-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #d8dbe1;
}

.login-page .container-fluid {
    min-height: 100dvh;
    display: flex;
    padding: 0;
}

.login {
    min-height: 100%;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.login .login-content {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login .logo {
    width: min(170px, 62%);
    margin: 0 auto;
    padding: 8px 18px 30px;
    display: block;
}

.login .card {
    width: min(100%, 560px);
    border-radius: 20px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(18, 28, 44, 0.94) 0%, rgba(13, 22, 36, 0.96) 100%);
    color: #e6edf8;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(4px);
}

.login .form-control {
    line-height: 30px;
    background: rgba(11, 19, 31, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f4f8ff;
}

.login .form-control::placeholder {
    color: #9cb0cc;
}

.login .form-control:focus {
    background: rgba(11, 19, 31, 0.9);
    color: #ffffff;
    border-color: rgba(75, 143, 247, 0.8);
    box-shadow: 0 0 0 .2rem rgba(75, 143, 247, 0.25);
}

.login h1,
.login .h4 {
    color: #f2f7ff;
}

.login .btn-primary {
    border-color: #4b8ff7;
    background: linear-gradient(180deg, #4f93f9 0%, #3f7ee8 100%);
}

.login .btn-primary:hover {
    border-color: #5da0ff;
    background: linear-gradient(180deg, #5da0ff 0%, #4a88ef 100%);
}

.login .btn {
    margin-top: 12px;
}

/* Two factor */

.two-factor-setup .two-factor-qr {
    max-width: 180px;
}

.two-factor-setup .google-auth-logo {
    width: 30px;
}

/* Droneplan Overview */

.droneplan-index .droneplan-list .droneplan {
    position: relative;
}

.droneplan-index .droneplan-list .droneplan.active {
    background: #3b7ddd;
    color: #fff;
}

.droneplan-index .droneplan-list .triangle-container {
    position: relative;
    background: #fff;
    border: none;
    border-top: none !important;
    top: 0;
    width: 0;
    height: 100%;
}

.droneplan-index .droneplan-list .droneplan.active .triangle-container .triangle {
    content: '';
    position: absolute;
    top: 50%;
    left: -1px;
    transform: translateY(-50%);
    width: 25px;
    height: 100%;
    background: #3b7ddd;
    -webkit-clip-path: polygon(0 0%, 0% 100%, 100% 50%);
    clip-path: polygon(0 0%, 0% 100%, 100% 50%);
}

/* Droneplan New */
.droneplan-new .upload-external-plan .system-logo {
    max-width: 200px;
}

.droneplan-new .upload-external-plan form {
    display: inline-flex;
    border: 1px dashed #efefef;
    border-radius: 10px;
    padding: 10px;
    justify-content: center;
}


/* Tutorial Items */

.info-box {
    position: absolute;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    padding: 10px;
    z-index: 1000;
    font-size: 16px;
    max-width: 300px;
    border-radius: 10px;
}

.info-box .fa {
    margin-right: 10px;
}

.arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.left-arrow {
    border-width: 20px 20px 20px 0;
    border-color: transparent #fff transparent transparent;
    top: 24px;
    left: -14px;
    margin-top: -20px;
}

.right-arrow {
    border-width: 20px 0 20px 20px;
    border-color: transparent transparent transparent #fff;
    top: 24px;
    right: -20px;
    margin-top: -10px;
}

/* Form */

form .select-list input {
    margin-right: 4px;
}

form .select-list label {
    margin-right: 10px;
}

form input {
    display: block;
}

form label>input {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

form .inline-checkboxes input {
    display: inline-block;
}

form .inline-checkboxes label {
    display: inline-block;
    margin: 0 15px 0 4px;
}

/* Presentable date range picker */
.presentable-datepicker-container .presentable-input-container {
    display: flex;
    justify-content: space-between;
}

.presentable-datepicker-container .presentable-datepicker {
    width: 1px;
    height: 0px;
    opacity: 0;
    border: none;
    padding: 0;
}

/* Video Bg */
.video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.video-bg video {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

@media (max-width: 990px) {

    .navbar {
        height: 50px;
        display: block;
    }

    .navbar .topbar-brand {
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 200px;
        color: #000;
        vertical-align: middle;
    }

    .navbar .topbar-brand img {
        width: 32px;
        vertical-align: middle;
    }

    .content {
        margin-top: 0;
    }

    .navbar {
        height: 60px;
        display: block;
    }

    .dronerequest-map #map {
        height: calc(100vh- 60px);
    }


    #sidebar.sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 100100;
        margin-left: -250px !important;
    }

    #sidebar.sidebar .sidebar-content {
        left: 0 !important;
        min-height: 100dvh;
    }

    #sidebar.sidebar.toggled {
        margin-left: 0 !important;
    }

    main.content {
        width: 100%;
        margin-left: 0 !important;
    }

    .sidebar-toggle {
        position: fixed !important;
        top: 10px;
        left: 6px;
        z-index: 100101;
        width: 26px;
        height: 26px;
        margin-left: .5rem;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

}


/* API Docs */

.api-docs table td {
    position: relative
}

.api-docs .news-label {
    position: absolute;
    background-color: #e83e8c;
    color: #fff;
    padding: 4px;
    border-radius: 5px;
    text-align: center;
    left: 0;
    top: 50%;
    font-size: 9px;
    transform: translateY(calc(-100% - 14px));
}

.api-docs .news-label::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: -2px;
    border-width: 7px;
    border-style: solid;
    border-color: transparent #e83e8c transparent transparent;
}

.api-docs .news-label.important {

    font-size: 14px;

}

.api-docs .news-label.deprecated {
    background-color: #515151;
}

.api-docs .news-label.deprecated::after {
    border-color: transparent transparent transparent #515151;
    border-color: transparent #515151 transparent transparent;
}

.api-docs .news-text {
    color: #e83e8c;
}

.api-docs .code-indent {
    margin-left: 14px;
}


/* Expandable TD */

.expandable-td-content {
    max-height: 80px;
    max-width: 300px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

.expandable-td-content.expanded {
    max-height: none;
    max-width: none;
    /* Remove max-height when expanded */
    overflow: visible;
}

/* Create a fade effect using a pseudo-element */
.expandable-td-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
}

/* Hide the fade when content is expanded */
.expandable-td-content.expanded::after {
    display: none;
}

.expand-td-btn,
.minimize-td-btn {
    cursor: pointer;
    text-align: center;
    margin-top: 10px;
    display: none;
    font-size: 10px;
}


.show-expand+.expand-td-btn {
    display: block;
    /* Show the button if content is larger than max-height */
}

/* Mattias additions */

.workflow {
    margin-bottom: 30px;
}

.workflow-optional {
    /*color: #999;*/
    font-size: 12px;
}

.workflow-optional h4 {
    /*color: #999;*/
    font-size: 16px;
}


.sandbox,
.sandbox:hover {
    background-color: yellow;
}


.help-text {
    font-style: italic;
    color: #aaa;
}

.required {
    /* background-color:#e6ffe6; */
}

.required td {
    /* color: black; */
}

.not-required td {
    color: #999;
}

.api-deprecated {
    background-color: #ccc;
}

.workflow-or {
    font-size: 20px;
    font-weight: bold;
    width: 100%;
    text-align: center;
}

.workflow-image {
    opacity: 0.6;
}



/*  END Mattias additions  */