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



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

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


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

/* 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;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 0 0 10px;
}

#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(50vh - 80px);
    /* Adjust to allow dropdown content to fit within the viewport */
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent horizontal scrolling */
}

/* Dropdown airspace */
#surface-map .airspace-type-menu {
    min-width: 240px;
}

#surface-map .airspace-type-menu .form-check-input,
#surface-map .area-menu .form-check-input {
    -webkit-appearance: none;
    appearance: none;
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    margin-top: 0;
    border: 1px solid #adb5bd;
    border-radius: 0.2rem;
    background-color: #fff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 0.72rem 0.72rem;
}

#surface-map .airspace-type-menu .form-check-input:checked,
#surface-map .area-menu .form-check-input:checked {
    background-color: #6c757d;
    border-color: #6c757d;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M5 10.5l3 3L15 6.5'/%3e%3c/svg%3e");
}

#surface-map .airspace-type-menu .form-check-input:focus,
#surface-map .area-menu .form-check-input:focus {
    border-color: #9aa4ad;
    box-shadow: 0 0 0 0.16rem rgba(108, 117, 125, 0.18);
}

#surface-map .map-settings__dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
}

#surface-map .map-settings__empty-state {
    color: #6c757d;
    font-size: 0.9rem;
}

@media (max-width: 990px) {
    #surface-map .map-settings .settings-menu .dropdown {
        width: 100%;
        margin-right: 0 !important;
    }

    #surface-map .map-settings .settings-menu .dropdown-menu {
        position: static !important;
        inset: auto !important;
        transform: none !important;
        float: none;
        width: 100%;
        margin-top: 0.5rem !important;
        max-height: 40vh;
    }
}

/* 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: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

.surface-notifications-container .surface-notification {
    width: min(420px, calc(100vw - 32px));
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-left-width: 4px;
    background: linear-gradient(180deg, rgba(18, 30, 46, 0.94) 0%, rgba(16, 26, 40, 0.94) 100%);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(6px);
    color: #d7e1f0 !important;
    line-height: 1.35;
}

.surface-notifications-container .surface-notification.error {
    border-left-color: #f97066;
    background: linear-gradient(180deg, rgba(77, 24, 29, 0.96) 0%, rgba(62, 21, 26, 0.96) 100%);
}

.surface-notifications-container .surface-notification.info {
    border-left-color: #f97066;
    background: linear-gradient(180deg, rgba(66, 30, 34, 0.96) 0%, rgba(54, 26, 30, 0.96) 100%);
}

.surface-notifications-container .surface-notification.success {
    border-left-color: #6ce9a6;
    background: linear-gradient(180deg, rgba(22, 66, 47, 0.96) 0%, rgba(19, 55, 40, 0.96) 100%);
}

.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,
.surface-notifications-container .surface-notification.info h1,
.surface-notifications-container .surface-notification.info h2,
.surface-notifications-container .surface-notification.info h3,
.surface-notifications-container .surface-notification.info h4,
.surface-notifications-container .surface-notification.info h5,
.surface-notifications-container .surface-notification.success h1,
.surface-notifications-container .surface-notification.success h2,
.surface-notifications-container .surface-notification.success h3,
.surface-notifications-container .surface-notification.success h4,
.surface-notifications-container .surface-notification.success h5 {
    color: #f8fbff !important;
}

.surface-notifications-container .surface-notification h4 {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.surface-notifications-container .surface-notification {
    font-size: 16px;
}

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

    #surface-map.fullscreen {
        height: calc(100dvh - 60px);
        min-height: calc(100dvh - 60px);
    }

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

    .wrapper {
        overflow-x: hidden;
    }

    #sidebar.sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 10002;
        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: 8px;
        z-index: 10003;
        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.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  */

/* Flight history */
.flight-history {
    --fh-ink: #0c1b2a;
    --fh-muted: #516175;
    --fh-card: #ffffff;
    --fh-edge: #d7e1ea;
    --fh-accent: #146a8b;
    --fh-accent-2: #0b3f5c;

    color: var(--fh-ink);
}

.flight-history__canvas {
    position: relative;
    overflow: hidden;
}

.flight-history__header {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.flight-history__title {
    font-size: clamp(2rem, 1.6rem + 1.2vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.flight-history__subtitle {
    margin: 8px 0 0;
    color: var(--fh-muted);
    font-size: 1rem;
}

.flight-history__summary {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    color: var(--fh-muted);
    font-size: 0.95rem;
}

.flight-history__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(20, 106, 139, 0.12);
    color: var(--fh-accent-2);
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.flight-history__filters {
    background: transparent;
}

.flight-history__grid {
    margin-top: 24px;
}

.flight-history__map {
    border-radius: 20px;
}

.flight-history #surface-map {
    width: 100%;
    height: 520px;
    border-radius: 16px;
}

.flight-history__panel {
    border-radius: 20px;
    max-height: 620px;
    height: auto;
    overflow: hidden;
}

.flight-history__panel .card-body {
    min-height: 0;
}

.flight-history__panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.flight-history__panel-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.flight-history__panel-meta {
    font-size: 0.9rem;
    color: var(--fh-muted);
}

.flight-history__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.plan-card {
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 12px 14px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
    border-color: var(--fh-accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(20, 106, 139, 0.12);
}

.plan-card.is-selected {
    border-color: var(--fh-accent);
    background: #eff8fb;
    box-shadow: inset 0 0 0 1px rgba(20, 106, 139, 0.2);
}

.plan-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.plan-card__callsign {
    font-weight: 600;
    font-size: 1rem;
}

.plan-card__status {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(20, 106, 139, 0.14);
    color: var(--fh-accent-2);
    font-weight: 600;
}

.plan-card__status--active {
    background: rgba(13, 130, 86, 0.18);
    color: #0a5a3c;
}

.plan-card__time {
    font-size: 0.9rem;
    color: var(--fh-muted);
    line-height: 1.3;
}

.plan-card__time--secondary {
    color: #8a97a6;
}

.plan-card__route {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fh-accent);
}

.flight-history__empty {
    border: 1px dashed var(--fh-edge);
    border-radius: 16px;
    padding: 16px;
    color: var(--fh-muted);
    background: #f4f7fa;
}

.tz-hint {
    color: #8a97a6;
    font-style: italic;
    font-size: 0.8em;
}

.tz-hint--day-offset {
    font-weight: 600;
    font-style: normal;
    cursor: help;
    margin-left: 0.15rem;
}

.flight-history-dropdown-toggle {
    position: relative;
    text-align: left;
    padding-right: 2.25rem;
    color: #6c757d;
    border-color: #c6ced6;
}

.flight-history-dropdown-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.85rem;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #6c757d;
    transform: translateY(-40%);
}

#flight-history-surface-area-filter,
#flight-heatmap-surface-area-filter,
#drone-request-history-surface-area-filter,
#flight-history-icon-filter,
#flight-heatmap-icon-filter {
    max-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (max-width: 1024px) {
    .flight-history__panel {
        max-height: none;
    }
}

@media (max-width: 640px) {
    .flight-history__canvas {
        padding: 20px;
    }

    .flight-history #surface-map {
        height: 420px;
    }
}
