html,
body {
    height: 100%;
}

/* Sidebar */


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

/* Content */
.content {
    margin-top: 40px;
    padding: 0px;
}

.content .header {
    margin-bottom: 20px;
}

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

.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active {
    background: #fff;
}

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

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


/* Maps */
#surface-drawpolygon-map,
#surface-map {
    width: 100%;
    height: 50vh;
    min-height: 200px;
}

#surface-map.square {
    height: auto;
    min-height: none;
    max-height: 200px;
    padding-bottom: 100%;
}

#surface-drawpolygon-map.fullscreen,
#surface-map.fullscreen {
    height: 100vh;
}

#surface-map .marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: #0b0b0b;
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -15px 0 0 -15px;
}

#surface-map .marker-pin::after {
    content: '';
    top: 0px;
    left: 0px;
    width: 24px;
    height: 24px;
    margin: 3px 0 0 3px;
    background: #fff;
    position: absolute;
    border-radius: 50%;
    z-index: -1;
}


#surface-map .custom-div-icon i {
    position: absolute;
    width: 22px;
    left: 0;
    right: 0;
    text-align: center;
    margin: 14px auto;
    font-size: 15px;
    color: #000;
}

#surface-map .custom-div-icon .name {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    text-wrap: nowrap;
    font-size: 10px;
    font-weight: bold;
    background-color: #fff;
    border-radius: 4px;
    padding: 4px;
}

#surface-map .summary-container {
    position: absolute;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 999;
    padding: 100px 10px 10px 10px;
    overflow-y: scroll;
    -ms-overflow-style: none;
    /* for Internet Explorer, Edge */
    scrollbar-width: none;
    /* for Firefox */
    overflow-y: scroll;
}

#surface-map .summary-container::-webkit-scrollbar {
    display: none;
    /* for Chrome, Safari, and Opera */
}

#surface-map .summary-container .inactive-container {
    display: none;
}


#surface-map .summary-container.show-inactive .inactive-container {
    display: block;
}



#surface-map .area-menu .area {
    color: #7d7d7d;
}

#surface-map .area-menu .area::before {
    content: "\f070";
    font-family: 'Font Awesome\ 6 Free';
    font-weight: 900;
    margin-right: 10px;
    padding: 10px 0;
    display: inline-block;
}

#surface-map .area-menu .area.enabled {
    color: #000000;
}

#surface-map .area-menu .area.enabled::before {
    content: "\f06e";
}


#surface-map .notfications-container {
    position: absolute;
    height: 100%;
    top: 0;
    right: 0;
    z-index: 999;
    padding: 100px 10px 10px 10px;
}


#surface-map .map-settings {
    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);
}


/* Style the switch when NOT checked */
.form-check-input:not(:checked) {
    background-color: red;
    /* Switch background */
    border-color: red;
    /* Border color */
}

/* Style the label when the checkbox is NOT checked */
.form-check-input:not(:checked)+.form-check-label {
    color: red;
}


#surface-map .map-settings .my-drone-icon {
    color: #2b82cb;
}

#surface-map .map-settings .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;
}

#surface-map .map-settings .area-icon {
    width: 10px;
    height: 10px;
    display: inline-block
}

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

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

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

#surface-map .map-settings .dropdown-menu {
    max-height: calc(100vh - 100px);
    /* Adjust to allow dropdown content to fit within the viewport */
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent horizontal scrolling */
}

/* Overview map */
#surface-map.surface-overview-map .settings-menu,
#surface-map.surface-drawpolygon-map .settings-menu {
    position: absolute;
    z-index: 9999;
    bottom: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.5);
}


/* Drones status bar */
#dronesStatusBar {
    min-height: 148px;
    padding-bottom: 10px;
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    background: #1D3C5E;
    z-index: 99999;
    overflow: hidden;
    max-height: 50vh;
}


#dronesStatusBar .header {
    background: #17314c;
}



#dronesStatusBar .drone-display-settings::after {
    display: none;
}

#dronesStatusBar::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 100%;
    height: 20px;
    background: linear-gradient(0deg, rgba(29, 60, 94, 1) 30%, rgba(29, 60, 94, 0) 100%);
}



#dronesStatusBar #drone-row-template {
    display: none;

}

#dronesStatusBar .drone-row {
    font-size: 13px;
    background: rgba(255, 255, 255, 0.04);
    margin: 1px;
    cursor: pointer;
    transition: background-color 1s ease;
}

#dronesStatusBar .drone-row.highlight {
    background-color: #28a745;

}


#dronesStatusBar .drone-row .status-icon {
    position: relative;
}

#dronesStatusBar .drone-row .status-icon i {
    position: absolute;
    left: -10px;
    top: 4px;
    font-size: 20px;
    border-radius: 50%;
    font-weight: 700;
}

#dronesStatusBar .drone-row .status-icon img {
    max-width: 34px;
    margin-left: 5px;
}

#dronesStatusBar .drone-row .message-container {
    position: relative;
    display: inline-block;
    text-align: left;
}




@keyframes pulsate {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.1);
        opacity: 1
    }

    100% {
        transform: scale(1);
        opacity: 0.4;
    }
}

#dronesStatusBar .drone-row .message-container .message-icon {
    font-size: 18px;
}

#dronesStatusBar .drone-row .message-container.has-unread .message-icon {

    animation: pulsate 1s infinite;
    margin-right: 10px;
}

#dronesStatusBar .drone-row .message-container.has-unread .unread-message-count {

    color: #fff;
    background: #dc3545;
    width: 20px;
    height: 20px;
    text-align: center;
    display: block;
    position: absolute;
    top: -4px;
    right: -8px;
    border-radius: 50%;
}

#dronesStatusBar .nav-link {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0 20px;
    border-bottom: 0;
}

#dronesStatusBar .notification-number.alert,
#dronesStatusBar .notification-number.success {
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    display: inline-block;
    border-radius: 50%;
    margin-top: -8px;
    font-size: 10px;
}

#dronesStatusBar .notification-number.alert {
    background: #dc3545;
    margin-right: 2px;
    margin-bottom: 0;
}


#dronesStatusBar .notification-number.success {
    background: #28a745;
    margin-right: 2px;
}

#dronesStatusBar .requests-container {
    max-height: 100%;
    height: 100%;
    overflow-y: scroll;
    position: relative;
    /* Take both header and footer into account  */
    padding-bottom: 50px;
}

#dronesStatusBar .btn-sm {
    font-size: 10px;
}

#dronesStatusBar .hidden-drones-text {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: #f22e2e;
    z-index: 99;
    font-weight: bold;
    border-radius: 4px 4px 0 0;
    padding: 2px 10px;
    background: rgba(29, 60, 94, 0.9);
    cursor: pointer;
}


#dronesStatusBar .ui-resizable-s {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 30px;
    cursor: ns-resize;
    border-bottom: #1D3C5E 4px solid;
}


#dronesStatusBar .ui-resizable-s::after {
    content: '';
    width: 100px;
    height: 2px;
    background-color: #e4e4e4;
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
}



/* Drones handling bar */

#drones-handling-popup {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 100%;
    background: #1D3C5E;
    z-index: 99999;
    width: 390px;
    opacity: 0.9;
    padding-top: 5px;
    overflow: hidden;
    display: none;
}

#drones-handling-popup .close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 20px;
}


#drones-handling-popup .card-header,
#drones-handling-popup .card-footer {
    background: #17314c;
}


#drones-handling-popup .card-header .action-type {
    position: relative;
}

#drones-handling-popup .card-header .action-type i {
    position: absolute;
    left: -8px;
    top: 8px;
    font-size: 18px;
    border-radius: 50%;
}

#drones-handling-popup .card-header .action-type img {
    max-width: 44px;
    margin-left: 5px;
}

#drones-handling-popup .card-header .action-type h3 {
    vertical-align: middle;
    margin-bottom: 0;
}

#drones-handling-popup .card-body b {
    text-align: left;
}


#drones-handling-popup .card-body b {
    display: inline-block;
    width: 100px;
}


/* App alert notification */
.surface-notifications-container {
    position: fixed;
    z-index: 9999999;
    top: 10px;
    right: 20px;
}

.surface-notifications-container .surface-notification {
    padding: 10px 20px;
    border-radius: 10px;
    margin-bottom: 10px;

}

.surface-notifications-container .surface-notification.error {
    background: red;
    color: #fff !important;
}

.surface-notifications-container .surface-notification.error h1,
.surface-notifications-container .surface-notification.error h2,
.surface-notifications-container .surface-notification.error h3,
.surface-notifications-container .surface-notification.error h4,
.surface-notifications-container .surface-notification.error h5 {
    color: #fff !important;
}

/* Leaflet icons */

.leaflet-div-icon {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.surface-drawpolygon-map .leaflet-div-icon {
    background: #fff !important;
    border: initial !important;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2) !important;
}



/* Vehicle statuses */
.leaflet-container .leaflet-marker-icon.inactive {
    display: none;
}

.leaflet-container .show-inactive .leaflet-marker-icon.inactive {
    display: block;
}

.leaflet-container .leaflet-marker-icon.idle .marker-pin,
.leaflet-container .leaflet-marker-icon.inactive .marker-pin {
    opacity: 0.5;
}

.leaflet-container .leaflet-marker-icon .inactive-icon {
    display: none;

}

.leaflet-container .leaflet-marker-icon.idle .inactive-icon,
.leaflet-container .leaflet-marker-icon.inactive .inactive-icon {
    display: block;
}

.leaflet-container .leaflet-marker-icon .inactive-icon {
    position: absolute;
    top: 33px;
    left: 20px;
}

.leaflet-container .leaflet-marker-icon .inactive-icon span {
    position: absolute;
    border-radius: 50%;
    color: #000;
    background: #fff;
    height: 11px;
    width: 11px;
    text-align: center;
    font-size: 8px;
    font-weight: bold;
}


.leaflet-container .leaflet-marker-icon .inactive-icon span:first-child {
    top: 0;
    left: -4px;
    transform: scale(0.8);
}

.leaflet-container .leaflet-marker-icon .inactive-icon span:nth-child(2) {
    top: -9px;
    left: 3px;
}

.leaflet-container .leaflet-marker-icon .inactive-icon span:nth-child(3) {
    top: -20px;
    left: 11px;
    transform: scale(1.1);
}

.map-loading-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}


/* Simple color picker */

.simplecolorpicker {
    display: block;
    padding: 6px 0px;
}

.simplecolorpicker span.color {
    display: inline-block;
    cursor: pointer;
    border: 3px solid transparent;
    width: 30px;
    height: 30px;
}

.simplecolorpicker .selectedColor {
    border-color: #000000 !important;

}


/* Login */

.login .logo {
    width: 200px;
    margin: 0 auto;
}

.login .card {
    border-radius: 20px;
}

.login .form-control {
    line-height: 30px;
}

/* 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: 0 20px 20px 20px;
    border-color: transparent transparent transparent #fff;
    top: 24px;
    right: -20px;
    margin-top: -10px;
}

.top-arrow {
    border-width: 0 20px 20px 20px;
    border-color: transparent transparent #ffffff transparent;
    top: -10px;
    left: calc(50% - 12px);
    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;
}

textarea#drone_plan_requested_area {
    min-height: 140px;
}

textarea#drone_plan_waypoints {
    min-height: 140px;
}

/* 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) {
    .content {
        margin-top: 0;
    }

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

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


/* 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.8;
}


/* Messages */

.message-view .messages-container {
    max-height: 240px;
    overflow-y: scroll;
}

.message-view .message {
    width: 72%;
    margin-bottom: 20px;
}

.message-view .message.my-message {
    float: right;
}

.message-view .message.their-message {
    float: left;
}

.message-view .message.my-message .text {
    background: #3b7ddd;
    color: #fff;
    border-radius: 10px 10px 0 10px;
    padding: 10px;

}

.message-view .message.their-message .text {
    background: #e7e7e7;
    color: #000;
    border-radius: 10px 10px 10px 0;
    padding: 10px;

}


/*  END Mattias additions  */