:root {
    --SCALE: 1;
    --BGCOLOR1: #111827;
    --BGCOLOR2: #1f2937;
    --BGCOLOR3: #f5f5f5;

    --ACCENT: #ff9600;
    --INFOBLOCK-OPACITY: 0.7;
    --FS1: calc( 10px * var(--SCALE));
    --FS2: calc( 13px * var(--SCALE));
    --FS3: calc( 17px * var(--SCALE));
    --TXTCOLOR1: #f9fafb;
    --TXTCOLOR2: #e5e7eb;
    --TXTCOLOR3: #9ca3af;
    --TXTCOLOR4: #404040;

    --sidebar-visible-width: 420px;
    --settings-panel-width: calc(440px * var(--SCALE));
}
:root,
:host {
  --ol-background-color: #f5f5f5 !important;
  --ol-accent-background-color: #d3d3d3!important;
  --ol-subtle-background-color: rgba(128, 128, 128, 0.25);
  --ol-partial-background-color: rgba(255, 255, 255, 0.75);
  --ol-foreground-color: #202020!important;
  --ol-subtle-foreground-color: #404040!important;
  --ol-brand-color: #ff9600!important;
}

body.is-localizing {
  visibility: hidden;
}

html, body {
    -ms-overflow-style: -ms-autohiding-scrollbar;
    margin: calc( 0px * var(--SCALE));
    padding: calc( 0px * var(--SCALE));
    background: var(--BGCOLOR1);
    background-color: var(--BGCOLOR1);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: var(--FS2);
    overflow: hidden;
    height: 100%;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    color: var(--TXTCOLOR2);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body {
    position: relative;
}

* {
    box-sizing: border-box;
}

select {
    font-size: var(--FS2);
    height: calc(22px * var(--SCALE));
}

#language_selector,
#units_selector,
#online_mode_radius_selector,
.settingsSelect {
    color: #0f172a;
    background-color: rgba(255, 255, 255, 0.92);
    border: calc(1px * var(--SCALE)) solid rgba(148, 163, 184, 0.6);
    border-radius: calc(6px * var(--SCALE));
    padding: 0 calc(8px * var(--SCALE));
}

#language_selector:focus,
#units_selector:focus,
#online_mode_radius_selector:focus,
.settingsSelect:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 calc(2px * var(--SCALE)) rgba(59, 130, 246, 0.35);
}

#language_selector option,
#units_selector option,
#online_mode_radius_selector option,
.settingsSelect option {
    background-color: #ffffff;
    color: #0f172a;
}

#planesTable {
    font-size: var(--FS2);
    white-space: nowrap;
    cursor: default;
}

#planesTable th,
#planesTable td {
    text-align: center;
}

/* Add inner horizontal padding on aircraft table edges */
#planesTable thead td:first-child,
#planesTable tbody td:first-child {
    padding-left: calc(10px * var(--SCALE));
}

#planesTable thead td:last-child,
#planesTable tbody td:last-child {
    padding-right: calc(10px * var(--SCALE));
}

#layout_container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 100%;
    min-height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

#selected_infoblock {
    position: absolute;
    left: 0px;
    bottom: 0px;
    width:  calc(180px * var(--SCALE));
    height: 100%;
    overflow: auto;
    z-index: 10001;
    background-color: var(--BGCOLOR1);
}
#selected_icao {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: calc( 8px * var(--SCALE));
}

#selected_icao .selected-icao-item {
    display: inline-flex;
    align-items: center;
}

#selected_icao.selected-icao-narrow {
    flex-direction: column;
    align-items: flex-start;
    gap: calc( 4px * var(--SCALE));
}
.aggregator-selected-bg:before {
    content: ' ';
    position:absolute;
    display:block;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background-size: calc( 148 * var(--SCALE)) calc( 148 * var(--SCALE));
    background-repeat: no-repeat;
    background-position: calc( 7px * var(--SCALE)) calc( 108px * var(--SCALE));
    background-image: url("images/aggregator-logo.png");
    z-index:2;
    opacity: 0.12;
}
#infoblock-container {
    position:relative;
    overflow: auto;
    height: 100%;
    z-index:3;
}
#sidebar_canvas {
    padding: calc( 5px * var(--SCALE));
    padding-top: calc( 40px * var(--SCALE));
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

#sidebar_container {
    display: flex;
    flex-direction: column;
    position: relative;
    align-self: stretch;
    height: 100%;
    min-height: 0;
    flex: 0 0 auto;
    width: var(--sidebar-visible-width);
    flex-basis: var(--sidebar-visible-width);
    min-width: calc(320px * var(--SCALE));
    max-width: 80vw;
    background: rgba(31, 41, 55, 0.85);
    -webkit-backdrop-filter: blur(calc( 20px * var(--SCALE)));
    backdrop-filter: blur(calc( 20px * var(--SCALE)));
    border-left: calc( 1px * var(--SCALE)) solid rgba(55, 65, 81, 0.5);
    border-top-left-radius: calc( 8px * var(--SCALE));
    border-bottom-left-radius: calc( 8px * var(--SCALE));
    box-shadow: calc(-4px * var(--SCALE)) 0 calc( 16px * var(--SCALE)) rgba(0,0,0,0.5);
    transition: background-color 0.3s ease;
    overflow: visible;
}

#container_splitter {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    width: 100%;
}

/*
@media (prefers-color-scheme: dark) {
    #sidebar_container {
        background: rgba(31, 41, 55, 0.85);
        border-left-color: rgba(55, 65, 81, 0.5);
        box-shadow: calc(-4px * var(--SCALE)) 0 calc( 16px * var(--SCALE)) rgba(0,0,0,0.5);
    }
}
*/


#map_container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    position: relative;
    flex: 1 1 auto;
    height: 100%;
    min-height: 100%;
    width: 100%;
    min-width: 0;
}

#map_surface {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    min-height: 100%;
}

#map_canvas_panel {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    min-height: 100%;
}

#map_canvas_inner {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    min-height: 100%;
}

#map_canvas {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}
#iconTestCanvas {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

#drawing_toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc( 6px * var(--SCALE));
}

#header_column {
    height: auto;
    padding-right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc( 4px * var(--SCALE));
}

#drawing_toolbar button {
    width: calc( 32px * var(--SCALE));
    height: calc( 32px * var(--SCALE));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #000;
    border-radius: calc( 4px * var(--SCALE));
    transition: background-color 0.15s ease, transform 0.15s ease;
}

#drawing_toolbar button:hover {
    background: rgba(15, 23, 42, 0.08);
}

#drawing_toolbar button:active {
    transform: translateY(1px);
}

#drawing_toolbar button:focus-visible {
    outline: 2px solid var(--ACCENT);
    outline-offset: 2px;
}

#drawing_toolbar button.active {
    background: var(--ACCENT);
    color: #000;
}

.drawing-toolbar__edit-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.drawing-toolbar__edit-controls[hidden] {
    display: none !important;
}

@media (max-height: 790px) {
    .buttonContainer {
        display: flex !important;
        flex-direction: row!important;
        align-items: flex-start!important;

    }
    #drawing_toolbar   {
        padding-left: 5px;

    }

    #header_column ::before {
        content: "";
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 0;
        background-color: #cccccc;
    }

    #header_column   {
        position: relative;
        padding-right: 0;
        align-items: center;
    }
}



#drawing_toolbar button svg {
    width: calc( 20px * var(--SCALE));
    height: calc( 20px * var(--SCALE));
    stroke: currentColor;
}

#drawing_toolbar button svg * {
    stroke: currentColor;
}

#top-map-icon {
    width: calc(270px * var(--SCALE) * 0.6);
    height: calc(60px * var(--SCALE) * 0.6);
    filter: drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.4));
    pointer-events: none;
}

.map-branding {
    position: absolute;
    top: calc(10px * var(--SCALE));
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: calc(10px * var(--SCALE));
    z-index: 150;
}


.map-help-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: calc(40px * var(--SCALE));
    height: calc(40px * var(--SCALE));
    border: none;
    background: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.map-help-button:hover {
    color: #fff;
}

.map-help-button:focus-visible {
    outline: 2px solid var(--ACCENT);
    outline-offset: 2px;
}

.map-help-button .material-icons {
    font-size: calc(24px * var(--SCALE));
    line-height: 1;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.65), 0 4px 8px rgba(15, 23, 42, 0.45);
}

.map-help-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(24px * var(--SCALE));
    z-index: 3000;
}

.map-help-modal[hidden] {
    display: none;
}

.map-help-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
}

.map-help-modal__panel {
    position: relative;
    width: min(960px, 100%);
    max-height: min(90vh, 900px);
    overflow: auto;
    background: rgba(17, 24, 39, 0.97);
    border-radius: calc(16px * var(--SCALE));
    padding: calc(28px * var(--SCALE));
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--TXTCOLOR2);
}

.map-help-modal__panel:focus {
    outline: none;
}

.map-help-modal__close {
    position: absolute;
    top: calc(16px * var(--SCALE));
    right: calc(16px * var(--SCALE));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: calc(4px * var(--SCALE));
    border: none;
    background: transparent;
    color: var(--TXTCOLOR2);
    cursor: pointer;
}

.map-help-modal__close:hover {
    color: var(--TXTCOLOR1);
}

.map-help-modal__close:focus-visible {
    outline: 2px solid var(--ACCENT);
    outline-offset: 2px;
}

.map-help-modal__close .material-icons {
    font-size: calc(24px * var(--SCALE));
    line-height: 1;
}

.map-help-modal__intro {
    margin: 0 0 calc(16px * var(--SCALE));
}

.map-help-modal__intro:first-of-type {
    margin-top: calc(12px * var(--SCALE));
}

.map-help-modal__title {
    margin: 0;
    font-size: var(--FS3);
    font-weight: 700;
    color: var(--TXTCOLOR1);
}

.map-help-modal__section + .map-help-modal__section {
    margin-top: calc(18px * var(--SCALE));
}

.map-help-modal__section h3 {
    margin: 0 0 calc(8px * var(--SCALE));
    font-size: var(--FS3);
    color: var(--TXTCOLOR1);
}

.map-help-modal__list {
    margin: 0;
    padding-left: calc(20px * var(--SCALE));
    list-style: disc;
}

.map-help-modal__list li + li {
    margin-top: calc(6px * var(--SCALE));
}

.map-help-modal__panel strong {
    color: var(--TXTCOLOR1);
}

.map-help-modal__list--icons {
    list-style: none;
    padding-left: 0;
}

.map-help-modal__item {
    display: flex;
    gap: calc(10px * var(--SCALE));
    align-items: flex-start;
}

.map-help-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(4px * var(--SCALE));
    min-width: calc(32px * var(--SCALE));
    height: calc(32px * var(--SCALE));
    padding: calc(4px * var(--SCALE));
    border-radius: calc(8px * var(--SCALE));
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #fff;
}

.map-help-modal__icon img {
    max-width: 100%;
    max-height: 100%;
    filter: brightness(0) invert(1);
}

.map-help-modal__icon svg {
    width: calc(24px * var(--SCALE));
    height: calc(24px * var(--SCALE));
    color: #fff;
}

.map-help-modal__icon svg [stroke-width]:not([stroke]) {
    stroke: currentColor;
}

.map-help-modal__icon .material-icons {
    font-size: calc(22px * var(--SCALE));
    color: #fff;
}

.map-help-modal__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: calc(26px * var(--SCALE));
    height: calc(26px * var(--SCALE));
    padding: 0 calc(8px * var(--SCALE));
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--TXTCOLOR1);
    font-weight: 700;
    font-size: calc(12px * var(--SCALE));
    border: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1;
}

/* Drawing labels and inspector */

.measure-tag {
    position: absolute;
    transform: translateY(-100%);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.measure-tag--measure {
    transform: translate(-50%, -50%);
    align-items: center;
    text-align: center;
    gap: 4px;
}

.measure-tag--point {
    transform: translate(-50%, calc(-100% - 8px));
    align-items: center;
    animation: markerDrop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes markerDrop {
    0% {
        transform: translate(-50%, calc(-100% - 50px));
        opacity: 0;
    }
    60% {
        transform: translate(-50%, calc(-100% - 4px));
    }
    100% {
        transform: translate(-50%, calc(-100% - 8px));
        opacity: 1;
    }
}

.measure-tag__chip {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

/* Modern Pin Design for Point Markers */
.measure-tag--point .measure-tag__chip {
    position: relative;
    flex-direction: column;
    gap: 8px;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

/* Hide chip children by default to show only the pin shape */
.measure-tag--point .measure-tag__chip > * {
    display: none !important;
}

.measure-tag--point .measure-tag__chip::before {
    content: '';
    width: 24px;
    height: 24px;
    background:
        radial-gradient(circle at 12px 12px,
            transparent 0%,
            transparent 3.5px,
            var(--marker-color, #f97316) 4.5px
        );
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(255, 255, 255, 0.95),
        0 0 0 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.measure-tag--point .measure-tag__chip::after {
    content: none;
}

.measure-tag--point .measure-tag__chip:hover::before,
.measure-tag--point .measure-tag__chip.marker-selected::before {
    transform: rotate(-45deg) scale(1.1);
    box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.25),
        0 0 0 3px rgba(255, 255, 255, 1),
        0 0 0 4px rgba(0, 0, 0, 0.12);
}

/* Non-point markers keep original chip style */
.measure-tag:not(.measure-tag--point) .measure-tag__chip {
    background: rgba(255, 255, 255, 0.98);
    color: #111827;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(6px);
}

.measure-tag--measure .measure-tag__chip {
    background: rgba(255, 255, 255, 0.82);
    border: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    border-radius: 14px;
    padding: 8px 16px;
    margin: 0;
    filter: none;
    backdrop-filter: blur(12px) saturate(1.05);
    color: #0f172a;
}

.measure-tag__actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
}

.measure-tag--measure .measure-tag__actions {
    display: none;
}

.measure-tag__actions[hidden] {
    display: none !important;
}

.measure-tag__primary {
    white-space: nowrap;
}

.measure-tag__secondary {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.75;
    white-space: nowrap;
}

.measure-tag--measure .measure-tag__primary,
.measure-tag--measure .measure-tag__secondary {
    color: #0f172a;
    text-shadow: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.measure-tag--measure .measure-tag__secondary {
    opacity: 0.9;
}

/* Marker Label Bar - Horizontal bar with name and icons */
.measure-tag--point .marker-label-bar {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    user-select: none;
    transition: all 0.2s ease;
    z-index: 10;
    pointer-events: auto;
}

.marker-label-name {
    cursor: pointer;
    transition: color 0.2s ease;
}

.marker-label-name:hover {
    color: #2563eb;
}

.marker-label-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 4px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.marker-label-icon:hover {
    background: #f3f4f6;
    color: #111827;
}

.marker-label-icon:active {
    transform: scale(0.95);
}

/* Inline editing input for marker name */
.marker-label-name-input {
    font-weight: 600;
    font-size: 13px;
    color: #111827;
    padding: 2px 4px;
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 4px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
    font-family: inherit;
    min-width: 80px;
}

/* Coordinate bar appears at bottom of marker when selected */
.measure-tag--point .marker-coordinate-bar {
    display: flex !important;
    align-items: center;
    gap: 8px;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 44px;
    background: #ffffff;
    color: #0f172a;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
    white-space: nowrap;
    pointer-events: auto;
}

/* Hide coordinate bar when hidden attribute is set */
.marker-coordinate-bar[hidden] {
    display: none !important;
}

.measure-tag--point .marker-coordinates {
    font-family: inherit;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    opacity: 0.9;
    color: #0f172a;
}

.measure-tag--point .measure-tag__secondary:not(.marker-coordinate-bar) {
    display: none; /* Hide secondary text element when not coordinate bar */
}

/* Marker Popup - Neutral Design */
.measure-tag--point .measure-tag__chip::after {
    content: none; /* Remove white center dot */
}

.measure-tag--point .marker-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -40px);
    min-width: 220px;
    margin-bottom: 8px;
    z-index: 100;
}

.marker-popup__inner {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(15, 23, 42, 0.12);
}

/* Color selector */

.marker-popup__section {
    margin-bottom: 8px;
    padding: 8px 8px 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
}

.marker-popup__color-selector {
    display: block;
}

.marker-popup__color-picker {
    width: 32px;
    height: 32px;
}

.marker-popup__color-picker .drawing-inspector__color-swatch {
    pointer-events: none;
}

.marker-popup__summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin: 0 2px 8px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    list-style: none;
    cursor: pointer;
    user-select: none;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
}

.marker-popup__summary::-webkit-details-marker {
    display: none;
}

.marker-popup__summary-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: var(--marker-color, #f97316);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.marker-popup__summary-dot--icon {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.marker-popup__color-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(26px, 1fr));
    gap: 8px;
    padding: 0 6px 6px;
}

.marker-popup__color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    padding: 0;
    outline: none;
    position: relative;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.marker-popup__color-swatch::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.marker-popup__color-swatch:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: transparent;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18), 0 0 0 4px rgba(255, 255, 255, 0.6);
}

.marker-popup__color-swatch:hover::after {
    opacity: 1;
}

.marker-popup__color-swatch--active {
    border-color: #0f172a;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.95), 0 0 0 5px rgba(255, 255, 255, 0.9), 0 12px 22px rgba(0, 0, 0, 0.16);
}

.marker-popup__custom-color {
    display: flex;
    justify-content: center;
    padding-top: 4px;
}

.marker-popup__color-selector,
.marker-popup__icon-selector {
    padding: 0;
    border: 1px solid #e5e7eb;
}

.marker-popup__icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    padding: 0 10px 10px;
}

.marker-popup__icon-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(145deg, #ffffff, #eef2ff);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    outline: none;
}

.marker-popup__icon-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: #c7d2fe;
}

.marker-popup__icon-option--active {
    border-color: #4f46e5;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.25);
    background: linear-gradient(145deg, #eef2ff, #e0e7ff);
}

.marker-popup__icon-glyph {
    width: 28px;
    height: 28px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.15));
}

.marker-popup__icon-label {
    font-weight: 600;
    color: #111827;
}

.marker-popup__upload-row {
    display: flex;
    justify-content: flex-end;
    padding: 0 10px 6px;
}

.marker-popup__upload-button {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.marker-popup__upload-button:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
}

.marker-popup__upload-button:active {
    transform: translateY(1px);
}

.marker-popup input[type="text"],
.marker-popup textarea {
    background: #ffffff;
    color: #111827;
}

.marker-color-button {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2px solid rgba(17, 24, 39, 0.15);
    background: var(--marker-color, #f97316);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    outline: none;
    padding: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.marker-color-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 16px rgba(0, 0, 0, 0.18);
}

.marker-color-button:active {
    transform: scale(0.95);
}

/* Action buttons */
.marker-popup__actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.marker-popup__button {
    flex: 1;
    padding: 8px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.marker-popup__button:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.marker-popup__button:active {
    transform: scale(0.95);
}

.marker-popup__button--danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.marker-popup__button--danger:hover {
    background: #fecaca;
    border-color: #fca5a5;
}

/* Non-point markers keep standard style */
.measure-tag:not(.measure-tag--point) .measure-tag__primary,
.measure-tag:not(.measure-tag--point) .measure-tag__secondary {
    font-weight: 700;
}

.measure-tag__note {
    pointer-events: none;
    padding: 6px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.96);
    font-size: 12px;
    line-height: 1.35;
    color: #111827;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
    min-width: 0;
    max-width: min(calc(320px * var(--SCALE)), 90vw);
    text-align: left;
    word-break: break-word;
    margin-bottom: calc(10px * var(--SCALE));
}

.measure-tag__note[hidden] {
    display: none !important;
}

.measure-tag--measure .measure-tag__note {
    background: rgba(255, 255, 255, 0.82);
    border: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    padding: 8px 12px;
    margin: 0;
    backdrop-filter: blur(12px) saturate(1.05);
}

.measure-tag__note-line {
    display: block;
    text-align: center;
    white-space: nowrap;
    word-break: normal;
}

.measure-tag__note-line--secondary {
    margin-left: 0;
}

.measure-tag__note-line--primary {
    margin-left: 0;
    font-weight: 700;
}

.measure-tag__button {
    border: none;
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
    cursor: pointer;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    touch-action: manipulation;
}

.measure-tag__button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

.measure-tag__button:hover {
    background: rgba(15, 23, 42, 0.14);
}

.measure-tag__button:active {
    transform: scale(0.96);
}

.measure-tag__button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    background: rgba(15, 23, 42, 0.18);
}

.qr-img {
    width: 78px !important;
    height: 78px !important;
    background: #fff;
    border: 3px solid rgba(255, 255, 255, 0.92);
    border-radius: 10px;
    padding: 3px;
    box-sizing: content-box !important;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.25);
    position: relative;
    z-index: 20;
    pointer-events: auto;
    touch-action: manipulation;
}

/* Position QR code properly for markers - below coordinate bar */
.measure-tag--point .qr-img {
    position: absolute !important;
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 88px); /* Below chip margin (44px) + coordinate bar (36px) + gap (8px) */
    margin-top: 0;
}

.drawing-inspector {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: calc(10px * var(--SCALE));
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
}

.drawing-inspector[hidden] {
    display: none !important;
}

.drawing-inspector__row {
    display: flex;
    align-items: flex-start;
    gap: calc(12px * var(--SCALE));
    width: min(calc(360px * var(--SCALE)), 100%);
    pointer-events: auto;
}

.drawing-inspector__color-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: calc(8px * var(--SCALE));
    flex-shrink: 0;
}

.drawing-inspector__color-stack--open {
    align-items: center;
}

.drawing-inspector__color-stack--open .drawing-inspector__color {
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.3);
    border-color: rgba(15, 23, 42, 0.28);
}

.drawing-inspector__color {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.28);
    border: 2px solid rgba(15, 23, 42, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
    align-self: flex-start;
    flex-shrink: 0;
}

.drawing-inspector__color-swatch {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.65);
    margin-left: 1px;
}

.drawing-inspector__color input[type="color"] {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    cursor: pointer;
    opacity: 0;
}

.drawing-inspector__palette-grid {
    width: calc(150px * var(--SCALE));
    padding: 0;
}

.drawing-inspector__palette-swatch {
    width: 26px;
    height: 26px;
}

.drawing-inspector__note {
    min-width: calc(220px * var(--SCALE));
    flex: 1 1 auto;
    width: 100%;
    pointer-events: auto;
    margin-top: 0;
}

.drawing-inspector__note textarea {
    width: 100%;
    min-height: calc(44px * var(--SCALE));
    max-height: calc(320px * var(--SCALE));
    padding: calc(6px * var(--SCALE)) calc(16px * var(--SCALE));
    border-radius: calc(14px * var(--SCALE));
    border: calc(1px * var(--SCALE)) solid var(--note-border-color, rgba(15, 23, 42, 0.18));
    background: rgba(255, 255, 255, 0.98);
    font-size: calc(12px * var(--SCALE));
    line-height: 1.35;
    color: #0f172a;
    outline: none;
    box-shadow: 0 calc(8px * var(--SCALE)) calc(18px * var(--SCALE)) var(--note-shadow-color, rgba(15, 23, 42, 0.18));
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    resize: vertical;
    overflow: hidden;
    pointer-events: auto;
}

.drawing-inspector__note textarea::placeholder {
    color: rgba(15, 23, 42, 0.4);
}

.drawing-inspector__note textarea:focus {
    border-color: var(--note-accent, var(--ACCENT));
    box-shadow: 0 0 0 calc(3px * var(--SCALE)) var(--note-focus-ring-color, rgba(114, 137, 218, 0.25));
}

/* Mouse coordinate display */
#mouse-coordinates {
    position: absolute;
    bottom: calc(8px * var(--SCALE));
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #000;
    padding: calc(3px * var(--SCALE)) calc(8px * var(--SCALE));
    border-radius: calc(6px * var(--SCALE));
    box-shadow: 0 calc(1px * var(--SCALE)) calc(4px * var(--SCALE)) rgba(0, 0, 0, 0.3);
    font-size: calc(12px * var(--SCALE));
    line-height: 1.35;
    pointer-events: none;
    width: max-content;
    z-index: 1000;
}


.sidebar_button {
    width: calc( 32px * var(--SCALE));
    height: calc( 38px * var(--SCALE));
    border-radius: calc( 2px * var(--SCALE));
    background-color: rgba(255,255,255,.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

#toggle_sidebar_button,
#shrink_sidebar_button {
    background-color: #ffffff;
}

#toggle_sidebar_button.show_sidebar {
    /* Arrow points left when sidebar hidden */
}

#toggle_sidebar_button.hide_sidebar {
}

#shrink_sidebar_button {
}

.sidebar_button img {
    width: calc(20px * var(--SCALE));
    height: calc(20px * var(--SCALE));
    pointer-events: none;
}

.sidebar_button svg {
    width: calc(20px * var(--SCALE));
    height: calc(20px * var(--SCALE));
    pointer-events: none;
    fill: currentColor;
}

#toggle_sidebar_button.show_sidebar img {
    transform: scaleX(-1);
}


#credits {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    position: absolute;
    bottom: calc( 10px * var(--SCALE));
    left: calc(50% - 60px * var(--SCALE));
}
.credits-text {
    font-size: var(--FS2);
}
.credits-image {
    display: block;
    width: calc( 24px * var(--SCALE));
    height: calc( 24px * var(--SCALE));
    background-size: calc( 24px * var(--SCALE)) calc( 24px * var(--SCALE));
    background-repeat: no-repeat;
    background-position: 0;
    background-color: transparent;
    border: none;
    background-image: url("images/aggregator-logo.png");
    z-index: 99;
    opacity: 0.7;
    margin: 4px;
}
.withOverflowingBackground::before {
   z-index: -1;
   background-image: url(https://www.exratione.com/assets/color_background.png);
}

#splitter {
    cursor: ew-resize;
    display: flex;
    position: absolute;
    z-index: 99;
    top: 0;
    bottom: 0;
    left: calc(-10px * var(--SCALE));
    width: calc( 20px * var(--SCALE));
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    touch-action: none;
    user-select: none;
}

#splitter::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: calc( 2px * var(--SCALE));
    background: rgba(0, 0, 0, 0.1);
    transform: translateX(-50%);
    transition: background 0.2s ease;
}

#splitter:hover::before,
#splitter:focus-visible::before,
#splitter:active::before,
#splitter.dragging::before {
    background: rgba(0, 0, 0, 0.3);
}

#splitter-infoblock {
    cursor: ns-resize;
    display: inline-block;
    position: absolute	;
    top: calc( 0px * var(--SCALE));
    right: 0;
    margin-left: auto;
    width: calc( 24px * var(--SCALE));
    height: calc( 4px * var(--SCALE));
    background-size: calc( 24px * var(--SCALE)) calc( 25px * var(--SCALE));
    background-repeat: no-repeat;
    background-position: calc( 0px * var(--SCALE));
    border: none;
    width: 100%;
    border-bottom: #234c75;
    background-color: #65819e;
    border-bottom-width: calc( 1px * var(--SCALE));
    border-bottom-style: solid;
    z-index: 1002;
}
.ol-control button:hover, .ol-control button:focus{
    outline: none !important;
}

.ol-zoom-in,.ol-zoom-out,#H{
    width: calc(40px * var(--SCALE)) !important;
    height: calc(40px * var(--SCALE)) !important;
}
#H{
    border-radius: calc(4px * var(--SCALE)) !important;
    padding: calc(10px * var(--SCALE));
}
/* remove the blue highlighting around the map buttons */
.ol-control button {
    outline: none;
    z-index: 999;
}

.map-control-button,
.ol-zoom-in,
.ol-zoom-out {
    width: calc(40px * var(--SCALE));
    height: calc(40px * var(--SCALE));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: rgba(255,255,255,0.9);
    border-radius: calc(4px * var(--SCALE));
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    color: #000;
    position: relative;
    outline: none;
    padding: 0;
    line-height: 1;
}

.map-control-button::before,
.ol-zoom-in::before,
.ol-zoom-out::before {
    content: '';
    position: absolute;
    top: calc(4px * var(--SCALE));
    left: calc(4px * var(--SCALE));
    right: calc(4px * var(--SCALE));
    bottom: calc(4px * var(--SCALE));
    border-radius: calc(4px * var(--SCALE));
    background: transparent;
    pointer-events: none;
    transition: background 0.2s ease;
}

.map-control-button:hover::before,
.map-control-button:focus-visible::before,
.map-control-button:active::before,
.ol-zoom-in:hover::before,
.ol-zoom-in:focus-visible::before,
.ol-zoom-in:active::before,
.ol-zoom-out:hover::before,
.ol-zoom-out:focus-visible::before,
.ol-zoom-out:active::before {
    background: rgba(0, 0, 0, 0.1);
}

.map-control-button:focus,
.map-control-button:focus-visible,
.map-control-button:active,
.ol-zoom-in:focus,
.ol-zoom-in:focus-visible,
.ol-zoom-in:active,
.ol-zoom-out:focus,
.ol-zoom-out:focus-visible,
.ol-zoom-out:active {
    outline: none;
    border: none;
}

.ol-zoom-in,
.ol-zoom-out {
    background-image: none;
    font-size: calc(20px * var(--SCALE)) !important;
}

.ol-zoom {
    background-color: transparent !important;
    position: absolute; /* Stellt sicher, dass die Positionierung relativ zum Karten-Container ist */
    bottom: calc( 30px * var(--SCALE));
    right: calc( 60px * var(--SCALE));
    top: auto;          /* Hebt die Standard-Positionierung oben auf */
    left: auto;         /* Hebt die Standard-Positionierung links auf */
    display: flex;    
    gap: calc(10px * var(--SCALE));
}

#home_button {
    position: absolute;
    right: calc( 10px * var(--SCALE));
    bottom: calc( 30px * var(--SCALE));
    z-index: 1000;
    display: flex;
}
#home_button button svg {
    width: calc(20px * var(--SCALE));
    height: calc(20px * var(--SCALE));
    stroke: currentColor;
    fill: none;
}

#home_button button svg path {
    fill: currentColor;
}

.ol-attribution {
    font-size: var(--FS1);
}

.warning {
    margin-top: 1em;
    border: calc( 2px * var(--SCALE)) solid yellow;
    background-color: #FFFFA3;
    padding: calc( 5px * var(--SCALE));
    color: black;
}

.error_box {
    position: absolute; bottom: calc( 90px * var(--SCALE)); left: calc( 25px * var(--SCALE)); border: calc( 2px * var(--SCALE)) solid red;
    background-color: #FFFFA3; opacity: 0.75; filter:alpha(opacity=75); padding: calc( 5px * var(--SCALE));
    color: black;
    font-weight: bold;
    font-size: var(--FS3);
    line-height: 150%;
    text-align: center;
}

.inaccurate_warning {
    position: absolute; top: calc( 25px * var(--SCALE)); left: calc( 280px * var(--SCALE));
    width: 50%;
    background-color: var(--BGCOLOR1);
    padding: calc( 5px * var(--SCALE));
}

#js_error {
    position: absolute;
    bottom: 5px;
    left: 5px;
    border: calc( 2px * var(--SCALE)) solid red;
    background-color: #FFFFA3; opacity: 0.75; filter:alpha(opacity=75); padding: calc( 5px * var(--SCALE));
    color: black;
    font-size: var(--FS2);
    line-height: 150%;
    text-align: center;
    z-index: 999;
    white-space: pre-line;
}

#loader {
    position: absolute;
    width: 25%;
    height: 30px;
    z-index: 9999;
    top: 50%;
    left: 37.5%;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    padding: 5px;
}

#loader_progress {
    width: 100%;
    height: 100%;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    background-color: transparent;
    border-radius: 10px;
    overflow: hidden;
    margin: 0;
}

#loader_progress::-webkit-progress-bar {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

#loader_progress::-webkit-progress-value {
    background: linear-gradient(to right, #4facfe, #00f2fe);
    border-radius: 10px;
}

#loader_progress::-moz-progress-bar {
    background: linear-gradient(to right, #4facfe, #00f2fe);
    border-radius: 10px;
}


.aircraft_table_header {
    background-color: var(--ACCENT);
    color: #FFFFFF;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow:
        0 -2px 2px -1px rgba(0, 0, 0, 0.5),
        0 2px 2px -1px rgba(0, 0, 0, 0.7);
}
.aircraft_table_header td {
    font-size: smaller;
    padding: calc(5px * var(--SCALE)) 0;
    text-align: center;
}

.verticalRateTriangle {
    font-family: "Courier New",monospace;
}

.icaoCodeColumn {
    font-family: monospace;
    text-transform: uppercase;
}

.plane_table_row {
    cursor: default;
    height: var(--FS2);
}

.hidden { display: none; }

.infoblock_heading a  { text-decoration: none; color: blue; font-size: x-small;}

.dim    { opacity: 0.3; filter:alpha(opacity=30); /* For IE8 and earlier */ }

.pointer { cursor: pointer; }

.sidebarButton {
    background-color: #409EDF;
    padding: calc( 4px * var(--SCALE));
    color: #FFFFFF;
    font-weight: normal;
    font-size: var(--FS2);
}

.sidebarButton:hover {
    background-color: #3c6ea3;
}

.altitudeFilterInput {
    width: 100%;
    color:var(--TXTCOLOR2);
    background-color: var(--BGCOLOR2);
    border-color: var(--BGCOLOR1);
}
.searchInput {
    width:  calc(100px * var(--SCALE));
    height:  calc(15px * var(--SCALE));
    color:var(--TXTCOLOR2);
    background-color: var(--BGCOLOR2);
    border-color: var(--BGCOLOR1);
}

.formButton {
    font-size: var(--FS2);
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease;
    cursor: pointer;
}
.formButton:disabled {
    color:var(--TXTCOLOR3);
}

.filter-grid {
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1024px) {
    .filter-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    width: 100%;
}

@media (min-width: 640px) {
    .filter-row {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        align-items: center;
    }
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.filter-input {
    width: 100%;
    min-width: 0;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.filter-actions .formButton {
    width: 100%;
}

@media (min-width: 640px) {
    .filter-actions {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        justify-self: start;
    }

    .filter-actions .formButton {
        width: auto;
    }
}

.filter-unit,
.filter-divider {
    white-space: nowrap;
    font-size: 0.875rem;
    color: #9ca3af;
}

.filter-divider {
    flex-shrink: 0;
}

select.error, textarea.error, input.error {
    color: #FF0000;
}

.layer-switcher {
    top: calc( 10px * var(--SCALE)) !important;
    left: calc( 10px * var(--SCALE)) !important;
    right: auto !important;
    z-index: 999;
}

.layer-switcher button {
    width: calc(40px * var(--SCALE));
    height: calc(40px * var(--SCALE));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: rgba(255,255,255,0.9);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    color: #000;
    position: relative;
    outline: none;
    padding: 0;
    float: none;
}

.layer-switcher button .map-type-switcher-icon {
    display: block;
    width: 24px;
    height: 24px;
    margin: auto;
    transform: none;
    flex-shrink: 0;
}

.layer-switcher button:hover,
.layer-switcher button:focus,
.layer-switcher button:focus-visible,
.layer-switcher button:active {
    background: rgba(255,255,255,0.9);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    border: none;
    outline: none;
}

.layer-switcher.layer-switcher-activation-mode-click > button,
.layer-switcher.shown.layer-switcher-activation-mode-click > button {
    margin: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    border: none;
    background: rgba(255,255,255,0.9);
}

/* Active state for layer switcher button when panel is shown */
.layer-switcher.shown > button::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.panel {
    border-color: var(--BGCOLOR3) !important;
    background-color: var(--BGCOLOR3) !important;
    color: var(--TXTCOLOR4) !important;
}

.layer-switcher.shown .panel {
    overflow-y: auto;
    position: relative;
    left: calc(17px * var(--SCALE));
    margin-top: calc(-4px * var(--SCALE));
    padding: calc(16px * var(--SCALE));
    border-radius: calc(14px * var(--SCALE)) !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    background-color: rgba(255, 255, 255, 0.98) !important;
    color: #0f172a !important;
    box-shadow: 0 calc(18px * var(--SCALE)) calc(48px * var(--SCALE)) rgba(15, 23, 42, 0.22);
    max-height: calc(100vh - 140px);
    max-height: calc(100svh - 140px);
    max-height: calc(100dvh - 140px);
}

.approach-alert-menu {
    position: absolute;
    bottom: calc(50px * var(--SCALE));
    left: calc(10px * var(--SCALE));
    z-index: 9999;
}

/* Data source menu - positioned below the overlay button */
.data-source-menu {
    position: absolute;
    top: calc(108px * var(--SCALE));
    left: calc(10px * var(--SCALE));
    bottom: auto;
    z-index: 9999;
}

.data-source-menu__button {
    width: calc(40px * var(--SCALE));
    height: calc(40px * var(--SCALE));
    border: none;
    border-radius: calc(4px * var(--SCALE));
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    z-index: 1;
}

.data-source-menu__button svg {
    width: calc(24px * var(--SCALE));
    height: calc(24px * var(--SCALE));
    stroke: #334155;
}

.data-source-menu__button:hover,
.data-source-menu__button:focus {
    outline: none;
}

.data-source-menu__button:hover::before,
.data-source-menu__button:focus::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
    transition: background 0.2s ease;
}

/* Data source menu panel visibility */
.data-source-menu .approach-alert-menu__panel {
    display: none;
    top: 0;
    bottom: auto;
    left: calc(46px * var(--SCALE));
}

.data-source-menu .approach-alert-menu__panel:not([hidden]) {
    display: block;
}

.data-source-menu__button .buttonIcon {
    margin: 0;
    width: calc(25px * var(--SCALE));
    height: calc(25px * var(--SCALE));
    display: block;
}

/* Data source info field - allow text wrapping */
#data_source_info {
    white-space: normal !important;
    word-wrap: break-word;
    text-align: left !important;
    min-width: 0 !important;
}

.approach-alert-menu__button {
    width: calc(40px * var(--SCALE));
    height: calc(40px * var(--SCALE));
    border: none;
    border-radius: calc(4px * var(--SCALE));
    background-color: #ffffff;
    background-image: url("images/approach-alert-icon.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: calc(22px * var(--SCALE));
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    z-index: 1;
}

.approach-alert-menu__button:hover,
.approach-alert-menu__button:focus {
    outline: none;
}

.approach-alert-menu__button:hover::before,
.approach-alert-menu__button:focus::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
    transition: background 0.2s ease;
}

.approach-alert-menu__panel {
    position: absolute;
    top: calc(46px * var(--SCALE));
    left: 0;
    display: none;
    width: calc(340px * var(--SCALE));
    min-width: calc(300px * var(--SCALE));
    max-width: 90vw;
    padding: calc(24px * var(--SCALE));
    border-radius: calc(14px * var(--SCALE));
    border: 1px solid rgba(148, 163, 184, 0.35);
    background-color: rgba(255, 255, 255, 0.98);
    color: #0f172a;
    box-shadow: 0 calc(18px * var(--SCALE)) calc(48px * var(--SCALE)) rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(calc(6px * var(--SCALE)));
    max-height: calc(100vh - 120px);
    max-height: calc(100svh - 120px);
    max-height: calc(100dvh - 120px);
    overflow: hidden auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

#approach_alert_menu .approach-alert-menu__panel {
    top: auto;
    bottom: 0;
    left: calc(46px * var(--SCALE));
}

.approach-alert-menu--open .approach-alert-menu__panel {
    display: block;
}

.approach-alert-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(12px * var(--SCALE));
    margin-bottom: calc(8px * var(--SCALE));
}

.approach-alert-menu__header {
    font-weight: 600;
    font-size: var(--FS3);
}

.approach-alert-menu[data-escalation-stage="1"] .approach-alert-menu__header {
    color: #eab308;
}

.approach-alert-menu[data-escalation-stage="2"] .approach-alert-menu__header {
    color: #f97316;
}

.approach-alert-menu[data-escalation-stage="3"] .approach-alert-menu__header {
    color: #ef4444;
}

.approach-alert-menu__toggle {
    display: flex;
    align-items: center;
    gap: calc(6px * var(--SCALE));
    font-weight: 500;
}

.approach-alert-menu__toggle--inline {
    justify-self: start;
}

.approach-alert-menu__toggle input {
    width: calc(18px * var(--SCALE));
    height: calc(18px * var(--SCALE));
    accent-color: var(--ACCENT);
}

.approach-alert-menu__controls {
    display: flex;
    flex-direction: column;
    gap: calc(8px * var(--SCALE));
    margin-bottom: calc(10px * var(--SCALE));
}

.approach-alert-menu__section {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: calc(10px * var(--SCALE));
    background: rgba(248, 250, 252, 0.85);
    overflow: visible;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.approach-alert-menu__section--open {
    border-color: rgba(15, 23, 42, 0.28);
    box-shadow: 0 calc(8px * var(--SCALE)) calc(18px * var(--SCALE)) rgba(15, 23, 42, 0.14);
}

.approach-alert-menu__section + .approach-alert-menu__section {
    margin-top: calc(8px * var(--SCALE));
}

.approach-alert-menu__section-title {
    font-size: var(--FS2);
    font-weight: 600;
    color: #0f172a;
    padding: calc(8px * var(--SCALE)) calc(10px * var(--SCALE));
    background: rgba(15, 23, 42, 0.06);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    margin: calc(-1px * var(--SCALE)) calc(-1px * var(--SCALE)) 0 calc(-1px * var(--SCALE));
    width: calc(100% + 2px);
    display: flex;
    align-items: center;
    gap: calc(6px * var(--SCALE));
    border-radius: calc(9px * var(--SCALE)) calc(9px * var(--SCALE)) 0 0;
}

.approach-alert-menu__section-content {
    padding: calc(12px * var(--SCALE));
    display: flex;
    flex-direction: column;
    gap: calc(10px * var(--SCALE));
}

/* GPS Status Dot */
.gps-status-dot {
    width: calc(8px * var(--SCALE));
    height: calc(8px * var(--SCALE));
    border-radius: 50%;
    background: #94a3b8;
    flex-shrink: 0;
}

.gps-status-dot--connected {
    background: #10b981;
    box-shadow: 0 0 calc(6px * var(--SCALE)) rgba(16, 185, 129, 0.5);
}

.gps-status-dot--disconnected {
    background: #ef4444;
}

.gps-status-dot--warning {
    background: #f59e0b;
    box-shadow: 0 0 calc(6px * var(--SCALE)) rgba(245, 158, 11, 0.5);
}

.gps-status-dot--nofix {
    background: #f59e0b;
    box-shadow: 0 0 calc(6px * var(--SCALE)) rgba(245, 158, 11, 0.5);
}

.gps-status-dot--available {
    background: #3b82f6;
    box-shadow: 0 0 calc(6px * var(--SCALE)) rgba(59, 130, 246, 0.5);
}

/* GPS Info Rows */
.gps-info-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: calc(2px * var(--SCALE));
    padding: calc(6px * var(--SCALE)) 0;
}

.gps-info-label {
    font-size: var(--FS2);
    color: rgba(17, 24, 39, 0.7);
    font-weight: 500;
}

.gps-info-value {
    font-size: var(--FS2);
    color: #0f172a;
    font-weight: 500;
    word-break: break-all;
    max-width: 100%;
}

.gps-info-value--mono {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: calc(12px * var(--SCALE));
    background: rgba(15, 23, 42, 0.06);
    padding: calc(2px * var(--SCALE)) calc(6px * var(--SCALE));
    border-radius: calc(4px * var(--SCALE));
    word-break: break-all;
}

/* GPS Action Buttons */
.gps-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(6px * var(--SCALE));
    width: 100%;
    padding: calc(10px * var(--SCALE)) calc(12px * var(--SCALE));
    border: none;
    border-radius: calc(8px * var(--SCALE));
    font-size: var(--FS2);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gps-action-btn--primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 calc(2px * var(--SCALE)) calc(8px * var(--SCALE)) rgba(249, 115, 22, 0.3);
}

.gps-action-btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    box-shadow: 0 calc(4px * var(--SCALE)) calc(12px * var(--SCALE)) rgba(249, 115, 22, 0.4);
    transform: translateY(calc(-1px * var(--SCALE)));
}

.gps-action-btn--primary:disabled {
    background: #cbd5e1;
    color: #64748b;
    box-shadow: none;
    cursor: not-allowed;
}

.gps-action-btn--secondary {
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.gps-action-btn--secondary:hover {
    background: rgba(15, 23, 42, 0.12);
    border-color: rgba(148, 163, 184, 0.6);
}

.gps-action-btn--secondary.active {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.gps-action-btn svg {
    flex-shrink: 0;
}

/* GPS Hint */
.gps-hint {
    font-size: calc(11px * var(--SCALE));
    color: #f59e0b;
    text-align: center;
    padding: calc(6px * var(--SCALE));
    background: #fef3c7;
    border-radius: calc(6px * var(--SCALE));
    border: 1px solid #fcd34d;
}

/* GPS Divider */
.gps-divider {
    display: flex;
    align-items: center;
    gap: calc(10px * var(--SCALE));
    color: #94a3b8;
    font-size: calc(11px * var(--SCALE));
    margin: calc(4px * var(--SCALE)) 0;
}

.gps-divider::before,
.gps-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(148, 163, 184, 0.4);
}

/* GPS Coordinate Input */
.gps-coord-input {
    display: flex;
    gap: calc(8px * var(--SCALE));
    align-items: flex-end;
}

.gps-coord-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: calc(4px * var(--SCALE));
}

.gps-coord-field label {
    font-size: calc(11px * var(--SCALE));
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gps-coord-field input {
    width: 100%;
    padding: calc(8px * var(--SCALE)) calc(10px * var(--SCALE));
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: calc(6px * var(--SCALE));
    font-size: var(--FS2);
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    background: white;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gps-coord-field input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 calc(3px * var(--SCALE)) rgba(249, 115, 22, 0.15);
}

.gps-coord-field input::placeholder {
    color: #94a3b8;
}

.gps-coord-save {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(38px * var(--SCALE));
    height: calc(38px * var(--SCALE));
    border: none;
    border-radius: calc(6px * var(--SCALE));
    background: #10b981;
    color: white;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.gps-coord-save:hover {
    background: #059669;
    transform: scale(1.05);
}

.gps-coord-save:active {
    transform: scale(0.98);
}

/* Data Source Select */
.data-source-select-wrapper {
    position: relative;
    width: 100%;
    min-height: calc(40px * var(--SCALE));
}

.data-source-select {
    width: 100%;
    height: calc(38px * var(--SCALE));
    min-height: calc(38px * var(--SCALE));
    padding: 0 calc(36px * var(--SCALE)) 0 calc(12px * var(--SCALE));
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: calc(8px * var(--SCALE));
    font-size: var(--FS2);
    font-weight: 500;
    background: white;
    color: #0f172a;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.data-source-select option {
    font-size: 14px;
    padding: 8px;
}

.data-source-select:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 calc(3px * var(--SCALE)) rgba(249, 115, 22, 0.15);
}

.data-source-select:hover {
    border-color: rgba(148, 163, 184, 0.8);
}

.data-source-select-arrow {
    position: absolute;
    right: calc(12px * var(--SCALE));
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748b;
}

/* Data Source Status Row */
.data-source-status-row {
    display: flex;
    flex-direction: column;
    gap: calc(4px * var(--SCALE));
    padding: calc(8px * var(--SCALE)) calc(10px * var(--SCALE));
    background: rgba(15, 23, 42, 0.04);
    border-radius: calc(6px * var(--SCALE));
}

.data-source-status-label {
    font-size: calc(11px * var(--SCALE));
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-source-status-value {
    font-size: var(--FS2);
    font-weight: 500;
    color: #0f172a;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Position Subsections */
.position-subsection {
    background: rgba(15, 23, 42, 0.03);
    border-radius: calc(8px * var(--SCALE));
    padding: calc(10px * var(--SCALE));
}

.position-subsection__header {
    display: flex;
    align-items: center;
    gap: calc(6px * var(--SCALE));
    margin-bottom: calc(8px * var(--SCALE));
}

.position-subsection__title {
    font-size: calc(12px * var(--SCALE));
    font-weight: 600;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-subsection__content {
    display: flex;
    flex-direction: column;
    gap: calc(8px * var(--SCALE));
}

.approach-alert-menu__section-toggle {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: calc(8px * var(--SCALE));
    padding: calc(10px * var(--SCALE)) calc(14px * var(--SCALE));
    font-size: var(--FS2);
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
}

.approach-alert-menu__section-toggle svg {
    flex-shrink: 0;
    width: calc(16px * var(--SCALE));
    height: calc(16px * var(--SCALE));
    stroke: #0f172a;
}

.approach-alert-menu__section-toggle:focus-visible {
    outline: calc(2px * var(--SCALE)) solid rgba(239, 68, 68, 0.45);
    outline-offset: calc(2px * var(--SCALE));
}

.approach-alert-menu__section-toggle::after {
    content: none;
}

.approach-alert-menu__section-panel {
    padding: calc(10px * var(--SCALE)) calc(14px * var(--SCALE));
    display: grid;
    gap: calc(8px * var(--SCALE));
}

.approach-alert-menu__section-panel[hidden] {
    display: none;
}

.approach-alert-menu__section.settingsDisabled {
    opacity: 0.55;
}

.approach-alert-menu__section.settingsDisabled .approach-alert-menu__section-toggle {
    cursor: default;
}

.approach-alert-menu__field {
    display: grid;
    grid-template-columns: minmax(calc(70px * var(--SCALE)), max-content) minmax(0, 1.5fr);
    column-gap: calc(12px * var(--SCALE));
    row-gap: calc(4px * var(--SCALE));
    align-items: center;
}

.approach-alert-menu__field > .approach-alert-menu__label {
    grid-column: 1;
}

.approach-alert-menu__field > .approach-alert-menu__input-group,
.approach-alert-menu__field > .approach-alert-menu__slider-group,
.approach-alert-menu__field > .approach-alert-menu__select,
.approach-alert-menu__field > .approach-alert-menu__slider,
.approach-alert-menu__field > .approach-alert-menu__value,
.approach-alert-menu__field > .approach-alert-menu__action {
    grid-column: 2;
}

.approach-alert-menu__field.settingsDisabled {
    opacity: 0.5;
}

.approach-alert-menu__label {
    font-weight: 500;
    font-size: var(--FS2);
    color: rgba(17, 24, 39, 0.82);
    height: calc(30px * var(--SCALE));
    min-height: calc(30px * var(--SCALE));
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.approach-alert-menu__input-group {
    display: flex;
    align-items: center;
    gap: calc(8px * var(--SCALE));
    flex-wrap: nowrap;
    width: 100%;
}

.approach-alert-menu__input,
.approach-alert-menu__select {
    width: 100%;
    padding: calc(6px * var(--SCALE));
    min-height: calc(34px * var(--SCALE));
    line-height: 1.35;
    border: 1px solid rgba(15, 23, 42, 0.2);
    border-radius: calc(4px * var(--SCALE));
    background-color: #f8fafc;
    color: inherit;
    font-size: var(--FS2);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.approach-alert-menu__select {
    height: calc(34px * var(--SCALE));
}

.approach-alert-menu__input {
    flex: 1 1 auto;
    min-width: 0;
}

.approach-alert-menu__input:focus,
.approach-alert-menu__select:focus {
    outline: none;
    box-shadow: 0 0 0 calc(2px * var(--SCALE)) rgba(255, 150, 0, 0.2);
}

.approach-alert-menu__input:disabled,
.approach-alert-menu__select:disabled {
    background-color: #f1f5f9;
    color: rgba(17, 24, 39, 0.6);
}

.approach-alert-menu__unit {
    flex: 0 0 auto;
    min-width: calc(48px * var(--SCALE));
    text-align: right;
    font-size: var(--FS2);
    color: rgba(17, 24, 39, 0.68);
}

.approach-alert-menu__slider {
    width: 100%;
}

.approach-alert-menu__slider-group {
    display: flex;
    align-items: center;
    gap: calc(8px * var(--SCALE));
    width: 100%;
}

.approach-alert-menu__slider-group .approach-alert-menu__slider {
    flex: 1 1 auto;
}

.approach-alert-menu__value {
    flex: 0 0 auto;
    font-weight: 600;
    font-size: var(--FS2);
    color: #0f172a;
    min-width: calc(72px * var(--SCALE));
    text-align: right;
    white-space: nowrap;
}

.approach-alert-menu__value--wrap {
    white-space: pre-line;
    text-align: left;
    min-width: 0;
}

#approach_alert_escalation_display {
    white-space: pre-line;
}

@media (max-width: 420px) {
    .approach-alert-menu__panel {
        width: 90vw;
    }

    .approach-alert-menu__field {
        grid-template-columns: 1fr;
        row-gap: calc(6px * var(--SCALE));
    }

    .approach-alert-menu__label {
        white-space: normal;
    }

    .approach-alert-menu__input-group {
        flex-wrap: wrap;
    }
}

.approach-alert-menu__actions {
    display: flex;
    justify-content: flex-end;
    gap: calc(8px * var(--SCALE));
    margin-top: calc(8px * var(--SCALE));
}

.approach-alert-menu__action {
    border: 1px solid rgba(15, 23, 42, 0.2);
    background-color: #ffffff;
    color: #111827;
    border-radius: calc(4px * var(--SCALE));
    padding: calc(6px * var(--SCALE)) calc(12px * var(--SCALE));
    font-size: var(--FS2);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.approach-alert-menu__action:hover,
.approach-alert-menu__action:focus {
    border-color: var(--ACCENT);
    color: var(--ACCENT);
    outline: none;
}

.approach-alert-menu__action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.approach-alert-menu__action--primary {
    background-color: var(--ACCENT);
    border-color: var(--ACCENT);
    color: #111827;
    font-weight: 600;
}

.approach-alert-menu__action--primary:hover,
.approach-alert-menu__action--primary:focus {
    background-color: #ffad33;
    border-color: #ffad33;
    color: #111827;
}

body.approach-alert-border-active {
    --approach-alert-border-band: clamp(40px, calc(64px * var(--SCALE, 1)), 96px);
    --approach-alert-border-edge: rgba(220, 38, 38, 0.96);
    --approach-alert-border-mid: rgba(239, 68, 68, 0.6);
    --approach-alert-border-soft: rgba(252, 165, 165, 0.24);
    --approach-alert-border-feather: rgba(254, 226, 226, 0.14);
    --approach-alert-border-clear: rgba(254, 226, 226, 0);
    --approach-alert-border-glow: rgba(220, 38, 38, 0.55);
    --approach-alert-border-edge-stop: 0%;
    --approach-alert-border-mid-stop: 32%;
    --approach-alert-border-soft-stop: 56%;
    --approach-alert-border-feather-stop: 78%;
    --approach-alert-border-clear-stop: 100%;
}

body.approach-alert-border-stage-1 {
    --approach-alert-border-edge: rgba(239, 68, 68, 0.98);
    --approach-alert-border-mid: rgba(248, 113, 113, 0.64);
    --approach-alert-border-soft: rgba(252, 165, 165, 0.28);
    --approach-alert-border-feather: rgba(254, 226, 226, 0.16);
    --approach-alert-border-clear: rgba(254, 226, 226, 0);
    --approach-alert-border-glow: rgba(239, 68, 68, 0.6);
}

body.approach-alert-border-stage-2 {
    --approach-alert-border-edge: rgba(220, 38, 38, 0.98);
    --approach-alert-border-mid: rgba(239, 68, 68, 0.72);
    --approach-alert-border-soft: rgba(248, 113, 113, 0.32);
    --approach-alert-border-feather: rgba(252, 165, 165, 0.18);
    --approach-alert-border-clear: rgba(252, 165, 165, 0);
    --approach-alert-border-glow: rgba(220, 38, 38, 0.68);
}

body.approach-alert-border-stage-3 {
    --approach-alert-border-edge: rgba(185, 28, 28, 0.98);
    --approach-alert-border-mid: rgba(220, 38, 38, 0.78);
    --approach-alert-border-soft: rgba(239, 68, 68, 0.38);
    --approach-alert-border-feather: rgba(248, 113, 113, 0.22);
    --approach-alert-border-clear: rgba(248, 113, 113, 0);
    --approach-alert-border-glow: rgba(185, 28, 28, 0.78);
}

body.approach-alert-border-active::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    border-radius: 0;
    background:
        linear-gradient(
            to bottom,
            var(--approach-alert-border-edge, rgba(248, 113, 113, 0.88)) var(--approach-alert-border-edge-stop, 0%),
            var(--approach-alert-border-mid, rgba(248, 113, 113, 0.52)) var(--approach-alert-border-mid-stop, 32%),
            var(--approach-alert-border-soft, rgba(248, 113, 113, 0.2)) var(--approach-alert-border-soft-stop, 56%),
            var(--approach-alert-border-feather, rgba(254, 226, 226, 0.12)) var(--approach-alert-border-feather-stop, 78%),
            var(--approach-alert-border-clear, rgba(254, 226, 226, 0)) var(--approach-alert-border-clear-stop, 100%)
        ) top / 100% var(--approach-alert-border-band, 48px) no-repeat,
        linear-gradient(
            to top,
            var(--approach-alert-border-edge, rgba(248, 113, 113, 0.88)) var(--approach-alert-border-edge-stop, 0%),
            var(--approach-alert-border-mid, rgba(248, 113, 113, 0.52)) var(--approach-alert-border-mid-stop, 32%),
            var(--approach-alert-border-soft, rgba(248, 113, 113, 0.2)) var(--approach-alert-border-soft-stop, 56%),
            var(--approach-alert-border-feather, rgba(254, 226, 226, 0.12)) var(--approach-alert-border-feather-stop, 78%),
            var(--approach-alert-border-clear, rgba(254, 226, 226, 0)) var(--approach-alert-border-clear-stop, 100%)
        ) bottom / 100% var(--approach-alert-border-band, 48px) no-repeat,
        linear-gradient(
            to right,
            var(--approach-alert-border-edge, rgba(248, 113, 113, 0.88)) var(--approach-alert-border-edge-stop, 0%),
            var(--approach-alert-border-mid, rgba(248, 113, 113, 0.52)) var(--approach-alert-border-mid-stop, 32%),
            var(--approach-alert-border-soft, rgba(248, 113, 113, 0.2)) var(--approach-alert-border-soft-stop, 56%),
            var(--approach-alert-border-feather, rgba(254, 226, 226, 0.12)) var(--approach-alert-border-feather-stop, 78%),
            var(--approach-alert-border-clear, rgba(254, 226, 226, 0)) var(--approach-alert-border-clear-stop, 100%)
        ) left / var(--approach-alert-border-band, 48px) 100% no-repeat,
        linear-gradient(
            to left,
            var(--approach-alert-border-edge, rgba(248, 113, 113, 0.88)) var(--approach-alert-border-edge-stop, 0%),
            var(--approach-alert-border-mid, rgba(248, 113, 113, 0.52)) var(--approach-alert-border-mid-stop, 32%),
            var(--approach-alert-border-soft, rgba(248, 113, 113, 0.2)) var(--approach-alert-border-soft-stop, 56%),
            var(--approach-alert-border-feather, rgba(254, 226, 226, 0.12)) var(--approach-alert-border-feather-stop, 78%),
            var(--approach-alert-border-clear, rgba(254, 226, 226, 0)) var(--approach-alert-border-clear-stop, 100%)
        ) right / var(--approach-alert-border-band, 48px) 100% no-repeat;
    box-shadow:
        inset 0 0 calc(var(--approach-alert-border-band, 48px) * 0.18) 0 var(--approach-alert-border-edge, rgba(248, 113, 113, 0.88)),
        inset 0 0 calc(var(--approach-alert-border-band, 48px) * 0.58) 0 var(--approach-alert-border-mid, rgba(248, 113, 113, 0.52)),
        inset 0 0 calc(var(--approach-alert-border-band, 48px) * 1.02) 0 var(--approach-alert-border-soft, rgba(248, 113, 113, 0.2)),
        inset 0 0 calc(var(--approach-alert-border-band, 48px) * 1.48) 0 var(--approach-alert-border-feather, rgba(254, 226, 226, 0.12)),
        0 0 calc(var(--approach-alert-border-band, 48px) * 0.72) var(--approach-alert-border-mid, rgba(239, 68, 68, 0.75)),
        0 0 calc(var(--approach-alert-border-band, 48px) * 1.52) var(--approach-alert-border-glow, rgba(220, 38, 38, 0.6));
    opacity: 0;
    animation: approach-alert-border-pulse 1.25s ease-in-out infinite;
    z-index: 160;
}

@keyframes approach-alert-border-pulse {
    0%,
    100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* new css */
.dateTime
{
    font-weight: bold;
    font-size: calc( 12px * var(--SCALE));
    line-height: calc( 26px * var(--SCALE));
    color: #FFFFFF;
    color: rgb(255, 255, 255);
    text-align: right;
    display: inline-block;
    padding-right: calc( 20px * var(--SCALE));
    padding-left: calc( 20px * var(--SCALE));
}

@media screen and (max-width: calc(000px * var(--SCALE))) {
    .dateTime {
        display: none;
    }
}

.sectionTitle {
    width: 100%;
    text-transform: uppercase;
    text-align: center;
    color: #e8e8e8;
    background: transparent;
    border-top: 1px solid rgba(226, 232, 240, 0.18);
    letter-spacing: 0.08em;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.section-title-content {
    padding: calc( 10px * var(--SCALE)) calc( 20px * var(--SCALE));
}

.infoblock-sectionHeader {
    display: flex;
    align-items: center;
    gap: calc( 10px * var(--SCALE));
    padding-left: calc( 8px * var(--SCALE));
}

.infoblock-sectionHeader .section-title-content {
    flex: 1 1 auto;
    text-align: left;
    letter-spacing: 0.06em;
}

.infoblock-toggle {
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: calc( 18px * var(--SCALE));
    line-height: 1;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: calc( 4px * var(--SCALE));
}

.infoblock-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 calc( 2px * var(--SCALE)) rgba(103, 182, 195, 0.45);
    border-radius: calc( 6px * var(--SCALE));
}

.legend
{
    font-size: 110%;
    color:var(--TXTCOLOR2);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: calc( 10px * var(--SCALE));
}


.settingsText
{
    font-size: calc( 14px * var(--SCALE));
    line-height: calc( 20px * var(--SCALE));

}

.link, .link a {
    color: var(--TXTCOLOR1);
    text-decoration: underline;
}

#header_side {
    position: absolute;
    right: calc( 10px * var(--SCALE));
    top:  calc( 10px * var(--SCALE));
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.9);
    border-radius: 4px;
    padding: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    gap: 4px;
}

#header_side.infoHeading {
    margin-top: 0;
    margin-bottom: 0;
}

.svgButton {
    background-color: var(--ACCENT);
    width: calc( 27px * var(--SCALE));
    height: calc( 27px * var(--SCALE));
    cursor: pointer;
    background-position: center;
    background-repeat: no-repeat;
    margin: calc( 2px * var(--SCALE));
    display: inline-block;
    border-radius: calc( 2px * var(--SCALE));
}

.fullscreenButton {
    background-image: url('images/fullscreen.svg');
    background-size: 90%;
}

.settingsCog {
    background-image: none;
    background-color: transparent;
    color: var(--TXTCOLOR2);
}

.overlayButton {
    background-image: url('images/layers-three.svg');
    background-size: calc( 20px * var(--SCALE)) calc( 20px * var(--SCALE));
}

.overlayFloatingButton {
    position: fixed;
    top: calc( 58px * var(--SCALE));
    left: calc( 10px * var(--SCALE));
    right: auto;
    width: calc( 40px * var(--SCALE));
    height: calc( 40px * var(--SCALE));
    border-radius: 4px;
    background-color: #ffffff;
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    background-position: center;
    background-repeat: no-repeat;
    background-size: calc( 20px * var(--SCALE)) calc( 20px * var(--SCALE));
    z-index: 1000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.overlayFloatingButton:hover,
.overlayFloatingButton:focus-visible {
    background-color: #ffffff;
    outline: none;
}

.overlayFloatingButton:hover::before,.overlayFloatingButton:focus-visible::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border-radius: 4px;
    background: transparent;
    pointer-events: none;
    transition: background 0.2s ease;
    background: rgba(0, 0, 0, 0.1);

}

/* Active state for overlay button when panel is open */
.overlayFloatingButton[aria-expanded="true"]::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.button {
    background-color: #fff;
    width: calc( 27px * var(--SCALE));
    height: calc( 27px * var(--SCALE));
    border-radius: calc( 2px * var(--SCALE));
    margin: calc( 2px * var(--SCALE));
    display: inline-block;
    cursor: pointer;
    text-align: center;
    background-clip: padding-box;
    vertical-align: top;
}

.button:hover,
.svgButton:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}


.buttonContainer {
    display: flex;
    margin: calc( 1px * var(--SCALE));
}

#header_side .buttonContainer {
    flex-direction: column;
    margin: 0;
}

#header_side .header-side-button {
    width: calc( 32px * var(--SCALE));
    height: calc( 32px * var(--SCALE));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    color: #000;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#header_side .header-side-button:disabled,
#header_side .header-side-button[disabled] {
    cursor: default;
    opacity: 0.6;
}

#header_side .header-side-button.button,
#header_side .header-side-button.svgButton,
#header_side .header-side-button.sidebar_button {
    background-color: transparent;
}

#header_side .header-side-button.svgButton {
    background-size: calc( 20px * var(--SCALE)) calc( 20px * var(--SCALE));
    background-position: center;
    background-repeat: no-repeat;
}

#header_side .header-side-button:focus-visible {
    outline: none;
}

#header_side .header-side-button:hover:not(.active):not(.activeButton):not(.is-active) {
    background-color: rgba(0,0,0,0.1);
    box-shadow: none;
}

#header_side .header-side-button:focus-visible:not(.active):not(.activeButton):not(.is-active) {
    background-color: rgba(0,0,0,0.1);
    box-shadow: none;
}

#header_side .header-side-button.active,
#header_side .header-side-button.activeButton,
#header_side .header-side-button.is-active {
    background-color: var(--ACCENT);
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

#header_side .header-side-button.active:hover,
#header_side .header-side-button.activeButton:hover,
#header_side .header-side-button.is-active:hover,
#header_side .header-side-button.active:focus-visible,
#header_side .header-side-button.activeButton:focus-visible,
#header_side .header-side-button.is-active:focus-visible {
    background-color: var(--ACCENT);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

#header_side .header-side-icon,
#header_side .header-side-button svg,
#header_side .header-side-button img {
    width: calc( 20px * var(--SCALE));
    height: calc( 20px * var(--SCALE));
    display: block;
    pointer-events: none;
}

#header_side .header-side-button svg {
    stroke: #000;
    color: #000;
}

#header_side .header-side-button svg [fill]:not([fill="none"]) {
    fill: #000;
}

#header_side .header-side-button img {
    filter: brightness(0) saturate(100%);
}

#header_side .header-side-button img[src*="multiselect_V2.svg"],
#header_side .header-side-button img[src*="follow_V2.svg"] {
    filter: none;
}

#header_side .buttonText {
    line-height: calc( 32px * var(--SCALE));
    margin: 0;
}

#header_side .buttonIcon {
    margin: 0;
}

#header_side .buttonIcon--online.material-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc( 20px * var(--SCALE));
    height: calc( 20px * var(--SCALE));
    margin: 0;
    font-size: calc( 20px * var(--SCALE));
    line-height: 1;
}

.buttonSpacer {
    margin: calc( 9px * var(--SCALE));
}

.buttonText
{
    font-weight: bold;
    font-size: calc( 15px * var(--SCALE));
    line-height:  calc( 27px * var(--SCALE));
    text-align: center;
    margin: calc( 5px * var(--SCALE));
}

.buttonIcon {
    width: calc( 17px * var(--SCALE));
    height: calc( 17px * var(--SCALE));
    margin: calc( 5px * var(--SCALE));
    display: inline-block;
}

.buttonIcon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.activeButton {
    color: orange;
}
.inActiveButton {
    color: #000;
}

#highlighted_infoblock {
    background-color: rgba(15, 23, 42, var(--INFOBLOCK-OPACITY));
    color: #e2e8f0;
    position: absolute;
    left: calc( 40px * var(--SCALE));
    top: calc( 60px * var(--SCALE));
    min-width:  calc(132px * var(--SCALE));
    padding-right: calc( 5px * var(--SCALE));
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.2);
    border-radius: calc( 8px * var(--SCALE));
    border: none;
    cursor: pointer;
    z-index: 9999;
    display: none;
    backdrop-filter: blur(10px);
}

.info-overlay-card .infoHeading,
.info-overlay-card .infoData,
.info-overlay-card .identLarge,
.info-overlay-card .identMedium,
.info-overlay-card .identSmall {
    color: #e2e8f0;
}

.highlightedStats {
    display: flex;
    flex-direction: column;
    row-gap: calc( 6px * var(--SCALE));
}

.highlightedStatsRow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    column-gap: calc( 8px * var(--SCALE));
}

.highlightedStatsRow .infoData {
    float: none;
}

.highlightedTitle {
    border-bottom: calc( 1px * var(--SCALE)) solid #67b6c3;
    display: inline-block;
    width: 90%;
}

.identLarge {
    font-size: calc( 22px * var(--SCALE));
    line-height: calc( 24px * var(--SCALE));
    color: var(--TXTCOLOR1);
    font-weight: lighter;
}

.identMedium {
    font-size: calc( 17px * var(--SCALE));
    line-height: calc( 22px * var(--SCALE));
    color: var(--TXTCOLOR1);
    font-weight: lighter;
}

.identSmall {
    font-size: calc( 14px * var(--SCALE));
    font-weight: bold;
    color: var(--TXTCOLOR1);
}

.infoSectionTable {
    width: 100%;
    border-collapse: collapse;
    padding: 0;
    margin: 0;
    cursor: default;
}

table.infoSectionTable tr td {
    padding: 0;
    margin: 0;
}

.rSpacer {
    padding-top: calc( 3px * var(--SCALE));
    padding-bottom: calc( 3px * var(--SCALE));
}

.infoHeading {
    margin-top: calc( 2px * var(--SCALE));
    margin-bottom: calc( 2px * var(--SCALE));
    display: inline-block;
}

.infoHeading sub {
    font-weight: normal;
}

.infoData {
    margin-top: calc( 2px * var(--SCALE));
    margin-bottom: calc( 2px * var(--SCALE));
    float: right;
    text-align: right;
    display: inline-block;
}

.infoBlockSection {
    padding-top: calc( 7px * var(--SCALE));
    padding-bottom: calc( 7px * var(--SCALE));
    padding-left: calc( 7px * var(--SCALE));
    padding-right: calc( 7px * var(--SCALE));
}

#selected_position {
    white-space: nowrap;
}

.infoblock-position-qr {
    display: flex;
    justify-content: center;
    padding-top: calc( 6px * var(--SCALE));
}

.infoblock-position-qr canvas,
.infoblock-position-qr img {
    width: calc( 96px * var(--SCALE));
    height: calc( 96px * var(--SCALE));
    image-rendering: crisp-edges;
}

.largeText a {
    font-weight: bold;
    color: var(--TXTCOLOR1);
    font-size: var(--FS3);
}

.largeText {
    font-weight: bold;
    color: var(--TXTCOLOR1);
    font-size: var(--FS3);
}

.infoBlockTitleText {
    font-weight: bold;
    color:var(--TXTCOLOR3);
}

#settings_infoblock {
    position: fixed;
    top: 1%;
    right: 1%;
    left: auto;
    overflow: auto;
    max-height: 90%;
    width: min(var(--settings-panel-width), calc(100% - 2%));
    box-shadow: 0 calc( 18px * var(--SCALE)) calc( 48px * var(--SCALE)) rgba(15, 23, 42, 0.22);
    padding: calc( 20px * var(--SCALE));
    z-index: 9999;
    display: none;
    background-color: rgba(255, 255, 255, 0.98);
    color: #0f172a;
    border-radius: calc( 14px * var(--SCALE));
    border: 1px solid rgba(148, 163, 184, 0.35);
    backdrop-filter: blur(calc( 6px * var(--SCALE)));
}

.settingsColumn {
    display: table-cell;
    width:  calc(199px * var(--SCALE));
}
.settingsOptionContainer {
    display: table;
    padding-top: calc( 3.5px * var(--SCALE));
    padding-bottom: calc( 3.5px * var(--SCALE));
}

.settingsAccordion {
    border-radius: calc( 12px * var(--SCALE));
    overflow: hidden;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.settingsAccordion--top {
    margin-bottom: calc( 6px * var(--SCALE));
}

.settingsAccordionToggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc( 6px * var(--SCALE));
    padding: calc( 8px * var(--SCALE)) calc( 10px * var(--SCALE));
    border: none;
    background: transparent;
    color: #0f172a;
    font-weight: 600;
    cursor: pointer;
}

.settingsAccordionToggle.is-open .settingsAccordionIcon {
    transform: rotate(180deg);
}

.settingsAccordionIcon {
    transition: transform 0.2s ease;
}

.settingsAccordionBody {
    padding: calc( 6px * var(--SCALE)) calc( 10px * var(--SCALE)) calc( 10px * var(--SCALE));
    display: grid;
    gap: calc( 6px * var(--SCALE));
}

.settingsFieldRow {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto 1fr auto;
    align-items: center;
    gap: calc( 6px * var(--SCALE));
}

.settingsColorInput {
    width: calc( 28px * var(--SCALE));
    height: calc( 28px * var(--SCALE));
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: #ffffff;
}

.settingsColorInput::-webkit-color-swatch-wrapper {
    padding: 0;
}

.settingsColorInput::-webkit-color-swatch {
    border: 0;
    border-radius: 50%;
}

.settingsColorInput::-moz-color-swatch {
    border: 0;
    border-radius: 50%;
}

.settingsOpacityValue {
    font-size: var(--FS2);
    color: #475569;
    min-width: calc( 34px * var(--SCALE));
    text-align: right;
}

input[type="range"] {
    --slider-track: rgba(226, 232, 240, 0.95);
    --slider-fill: #3b82f6;
    --slider-thumb: #ffffff;
    --slider-thumb-border: rgba(148, 163, 184, 0.9);
    --slider-thumb-shadow: 0 calc( 6px * var(--SCALE)) calc( 14px * var(--SCALE)) rgba(15, 23, 42, 0.18);
    appearance: none;
    accent-color: var(--slider-fill);
    width: 100%;
    height: calc( 16px * var(--SCALE));
    background: transparent;
    padding: 0;
    margin: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: calc( 6px * var(--SCALE));
    background: var(--slider-track);
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: calc( 16px * var(--SCALE));
    height: calc( 16px * var(--SCALE));
    border-radius: 50%;
    background: var(--slider-thumb);
    border: 1px solid var(--slider-thumb-border);
    box-shadow: var(--slider-thumb-shadow);
    margin-top: calc( -5px * var(--SCALE));
}

input[type="range"]::-moz-range-track {
    height: calc( 6px * var(--SCALE));
    background: var(--slider-track);
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

input[type="range"]::-moz-range-progress {
    height: calc( 6px * var(--SCALE));
    background: var(--slider-fill);
    border-radius: 999px;
}

input[type="range"]::-moz-range-thumb {
    width: calc( 16px * var(--SCALE));
    height: calc( 16px * var(--SCALE));
    border-radius: 50%;
    background: var(--slider-thumb);
    border: 1px solid var(--slider-thumb-border);
    box-shadow: var(--slider-thumb-shadow);
}

input[type="range"]:focus-visible {
    outline: calc( 2px * var(--SCALE)) solid rgba(59, 130, 246, 0.35);
    outline-offset: calc( 4px * var(--SCALE));
}

.settingsRangeWide {
    width: calc( 140px * var(--SCALE));
}

.settingsAdvancedGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc( 6px * var(--SCALE)) calc( 12px * var(--SCALE));
}

.settingsFullWidth {
    width: 100%;
    margin-top: calc( 6px * var(--SCALE));
    display: grid;
    gap: calc( 6px * var(--SCALE));
}

#settingsLeft,
#settingsRight {
    padding-top: calc( 4px * var(--SCALE));
}

.settingsInlineRow {
    margin-bottom: calc( 6px * var(--SCALE));
}

.settingsFooter {
    margin-top: calc( 12px * var(--SCALE));
    display: flex;
    justify-content: center;
}

.settingsResetButton {
    display: inline-flex;
    align-items: center;
    gap: calc( 6px * var(--SCALE));
    padding: calc( 6px * var(--SCALE)) calc( 12px * var(--SCALE));
    border-radius: calc( 999px * var(--SCALE));
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(148, 163, 184, 0.14);
    color: #0f172a;
    font-weight: 600;
    cursor: pointer;
}

.settingsResetButton .material-icons {
    font-size: calc( 18px * var(--SCALE));
}

.settingsCheckbox {
    width: calc( 12px * var(--SCALE));
    height: calc( 12px * var(--SCALE));
    background-size: calc( 12px * var(--SCALE)) calc( 12px * var(--SCALE));
    margin-left: calc( 5px * var(--SCALE));
    margin-right: calc( 5px * var(--SCALE));
    background-image: url('images/box-empty.png');
    background-repeat: no-repeat;
    background-position: center;
    background-color: rgba(148, 163, 184, 0.18);
    cursor: pointer;
}

.settingsCheckboxChecked {
    background-image: url('images/box-checked.png') !important;
    background-color: rgba(148, 163, 184, 0.18);
}

.settingsOptionContainer.settingsDisabled {
    opacity: 0.5;
}

.settingsNumberInput,
.settingsRangeInput,
.settingsSelectInput {
    display: table-cell;
    margin-left: calc( 6px * var(--SCALE));
    margin-right: calc( 6px * var(--SCALE));
    vertical-align: middle;
}

.settingsNumberInput {
    width: calc( 80px * var(--SCALE));
    padding: calc( 2px * var(--SCALE));
}

.settingsRangeInput {
    width: calc( 140px * var(--SCALE));
}

.settingsRangeFull {
    width: 100%;
}

.settingsSelectInput {
    width: calc( 140px * var(--SCALE));
    padding: calc( 2px * var(--SCALE));
}

.settingsInlineRow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: calc( 6px * var(--SCALE)) calc( 10px * var(--SCALE));
}

.settingsInlineField {
    display: grid;
    gap: calc( 4px * var(--SCALE));
}

#settings_infoblock hr {
    display: none;
}

.settingsInlineRow .settingsSelect {
    width: auto;
    max-width: calc( 160px * var(--SCALE));
    border: none;
    background-color: rgba(255, 255, 255, 0.92);
}

#settings_infoblock .infoBlockTitleText {
    color: #0f172a;
}

#settings_infoblock .settingsText {
    color: #0f172a;
}

.settingsInlineRow .infoBlockTitleText {
    white-space: nowrap;
}

.settingsCloseBox {
    position: absolute;
    right: calc( 4px * var(--SCALE));
    top: calc( 4px * var(--SCALE));
    background-image: url('images/close-settings.png');
    background-size: cover;
    width: calc( 20px * var(--SCALE));
    height: calc( 20px * var(--SCALE));
    cursor: pointer;
    border: none;
    background-color: transparent;
    padding: 0;
    margin: 18px;
}

#overlay_manager {
    position: fixed;
    top: calc( 58px * var(--SCALE));
    left: calc( 60px * var(--SCALE));
    right: auto;
    width: min(90vw, calc( 420px * var(--SCALE)));
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 calc( 18px * var(--SCALE)) calc( 48px * var(--SCALE)) rgba(15, 23, 42, 0.22);
    padding: calc( 24px * var(--SCALE));
    z-index: 1099;
    display: none;
    background-color: rgba(255, 255, 255, 0.98);
    color: #0f172a;
    border-radius: calc( 14px * var(--SCALE));
    border: 1px solid rgba(148, 163, 184, 0.35);
    backdrop-filter: blur(calc( 6px * var(--SCALE)));
}

#overlay_manager h3 {
    margin: 0;
    font-size: calc( 20px * var(--SCALE));
    color: #0f172a;
}

#overlay_manager .overlay-manager-content {
    display: flex;
    flex-direction: column;
    gap: calc( 16px * var(--SCALE));
}

#overlay_manager .overlay-manager-header {
    display: flex;
    flex-direction: column;
    gap: calc( 4px * var(--SCALE));
}

#overlay_manager .overlay-manager-header p {
    margin: 0;
    font-size: calc( 14px * var(--SCALE));
    color: #475569;
    line-height: 1.5;
}

#overlay_manager .overlay-tablist {
    display: flex;
    align-items: center;
    gap: calc( 8px * var(--SCALE));
    background: rgba(148, 163, 184, 0.12);
    padding: calc( 4px * var(--SCALE));
    border-radius: calc( 14px * var(--SCALE));
}

#overlay_manager .overlay-tab {
    flex: 1 1 0;
    border: none;
    background: transparent;
    padding: calc( 10px * var(--SCALE)) calc( 12px * var(--SCALE));
    border-radius: calc( 10px * var(--SCALE));
    font-size: calc( 14px * var(--SCALE));
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#overlay_manager .overlay-tab.is-active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 calc( 12px * var(--SCALE)) calc( 24px * var(--SCALE)) rgba(15, 23, 42, 0.12);
}

#overlay_manager .overlay-tab:hover {
    color: #1d4ed8;
}

#overlay_manager .overlay-tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 calc( 2px * var(--SCALE)) rgba(59, 130, 246, 0.55);
}

#overlay_manager .overlay-status {
    font-size: calc( 14px * var(--SCALE));
    min-height: calc( 20px * var(--SCALE));
    color: #475569;
    border-radius: calc( 12px * var(--SCALE));
    padding: calc( 10px * var(--SCALE)) calc( 14px * var(--SCALE));
    border: 1px solid rgba(148, 163, 184, 0.35);
    background-color: rgba(148, 163, 184, 0.14);
}

#overlay_manager .overlay-status:empty {
    display: none;
}

#overlay_manager .overlay-status.overlay-status--error {
    color: #b91c1c;
    border-color: rgba(248, 113, 113, 0.6);
    background-color: rgba(254, 226, 226, 0.8);
}

#overlay_manager .overlay-status.overlay-status--success {
    color: #047857;
    border-color: rgba(74, 222, 128, 0.45);
    background-color: rgba(220, 252, 231, 0.9);
}

#overlay_manager .overlay-status.overlay-status--info {
    color: #1d4ed8;
    border-color: rgba(191, 219, 254, 0.7);
    background-color: rgba(219, 234, 254, 0.9);
}

#overlay_manager .overlay-panels {
    display: flex;
    flex-direction: column;
    gap: calc( 16px * var(--SCALE));
}

#overlay_manager .overlay-panel {
    display: none;
}

#overlay_manager .overlay-panel.is-active {
    display: block;
    animation: overlayFadeIn 0.25s ease;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
        transform: translateY(calc( 8px * var(--SCALE)));
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#overlay_manager .overlay-list {
    display: flex;
    flex-direction: column;
    gap: calc( 12px * var(--SCALE));
}

#overlay_manager .overlay-empty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: calc( 10px * var(--SCALE));
    padding: calc( 28px * var(--SCALE));
    border-radius: calc( 16px * var(--SCALE));
    border: 1px dashed rgba(148, 163, 184, 0.45);
    background-color: rgba(241, 245, 249, 0.8);
    text-align: center;
    font-size: calc( 14px * var(--SCALE));
    color: #475569;
}

#overlay_manager .overlay-empty-card .material-icons {
    font-size: calc( 32px * var(--SCALE));
    color: #94a3b8;
}

#overlay_manager .overlay-empty-card strong {
    font-size: calc( 15px * var(--SCALE));
    color: #1e293b;
}

#overlay_manager .overlay-empty-card p {
    margin: 0;
}

#overlay_manager .overlay-item {
    display: flex;
    flex-direction: column;
    gap: calc( 12px * var(--SCALE));
    padding: calc( 18px * var(--SCALE));
    border-radius: calc( 18px * var(--SCALE));
    background-color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 calc( 12px * var(--SCALE)) calc( 28px * var(--SCALE)) rgba(15, 23, 42, 0.12);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#overlay_manager .overlay-item.is-hidden {
    opacity: 0.6;
}

#overlay_manager .overlay-item.is-hidden .overlay-item-name {
    color: #475569;
}

#overlay_manager .overlay-item:hover,
#overlay_manager .overlay-item:focus-within {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 calc( 18px * var(--SCALE)) calc( 34px * var(--SCALE)) rgba(15, 23, 42, 0.16);
    transform: translateY(calc(-2px * var(--SCALE)));
}

#overlay_manager .overlay-import {
    display: flex;
    flex-direction: column;
    gap: calc( 16px * var(--SCALE));
}

#overlay_manager .overlay-import p {
    margin: 0;
    font-size: calc( 14px * var(--SCALE));
    color: #475569;
    line-height: 1.6;
}

#overlay_manager .overlay-dropzone {
    border: 2px dashed rgba(148, 163, 184, 0.7);
    border-radius: calc( 24px * var(--SCALE));
    padding: calc( 24px * var(--SCALE));
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.35), rgba(248, 250, 252, 0.95));
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: calc( 12px * var(--SCALE));
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    color: inherit;
    width: 100%;
    border-style: dashed;
}

#overlay_manager .overlay-dropzone:hover,
#overlay_manager .overlay-dropzone:focus-visible,
#overlay_manager .overlay-dropzone.is-active {
    border-color: rgba(59, 130, 246, 0.75);
    box-shadow: 0 calc( 16px * var(--SCALE)) calc( 32px * var(--SCALE)) rgba(59, 130, 246, 0.2);
    background-color: rgba(219, 234, 254, 0.75);
    transform: translateY(calc(-2px * var(--SCALE)));
    outline: none;
}

#overlay_manager .overlay-dropzone-icon {
    font-size: calc( 38px * var(--SCALE));
    color: #2563eb;
}

#overlay_manager .overlay-dropzone-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc( 2px * var(--SCALE));
}

#overlay_manager .overlay-dropzone-title {
    font-size: calc( 16px * var(--SCALE));
    font-weight: 600;
    color: #1e293b;
}

#overlay_manager .overlay-dropzone-subtitle {
    font-size: calc( 13px * var(--SCALE));
    color: #475569;
    font-weight: 500;
}

#overlay_manager .overlay-dropzone-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: calc( 10px * var(--SCALE)) calc( 16px * var(--SCALE));
    border-radius: calc( 12px * var(--SCALE));
    background: linear-gradient(135deg, #2563eb, #4338ca);
    color: #ffffff;
    font-size: calc( 14px * var(--SCALE));
    font-weight: 600;
    pointer-events: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#overlay_manager .overlay-dropzone:hover .overlay-dropzone-cta,
#overlay_manager .overlay-dropzone:focus-visible .overlay-dropzone-cta,
#overlay_manager .overlay-dropzone.is-active .overlay-dropzone-cta {
    transform: translateY(calc(-1px * var(--SCALE)));
    box-shadow: 0 calc( 12px * var(--SCALE)) calc( 24px * var(--SCALE)) rgba(37, 99, 235, 0.25);
}

#overlay_manager .overlay-dropzone-meta {
    font-size: calc( 12px * var(--SCALE));
    color: #64748b;
}

#overlay_manager .overlay-import-options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: calc( 10px * var(--SCALE));
}

#overlay_manager .overlay-import-options li {
    display: flex;
    align-items: center;
    gap: calc( 8px * var(--SCALE));
    font-size: calc( 13px * var(--SCALE));
    color: #475569;
}

#overlay_manager .overlay-import-options li .material-icons {
    font-size: calc( 18px * var(--SCALE));
    color: #2563eb;
}

#overlay_manager .imagery-panel {
    display: flex;
    flex-direction: column;
    gap: calc( 16px * var(--SCALE));
}

#overlay_manager .imagery-intro {
    font-size: calc( 14px * var(--SCALE));
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

#overlay_manager .imagery-hint {
    font-size: calc( 12px * var(--SCALE));
    color: #64748b;
    margin: 0;
}

#overlay_manager .imagery-dropzone {
    margin-bottom: calc( 4px * var(--SCALE));
}

#overlay_manager .imagery-slider-group {
    display: flex;
    flex-direction: column;
    gap: calc( 6px * var(--SCALE));
}

#overlay_manager .imagery-slider {
    display: flex;
    align-items: center;
    gap: calc( 8px * var(--SCALE));
}

#overlay_manager .imagery-slider input[type="range"] {
    flex: 1;
}

#overlay_manager .imagery-slider-value {
    font-weight: 600;
    min-width: calc( 48px * var(--SCALE));
    text-align: right;
}

#overlay_manager .imagery-list {
    min-height: calc( 80px * var(--SCALE));
}

#overlay_manager .imagery-empty {
    align-items: center;
    text-align: center;
}

#overlay_manager .imagery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: calc( 8px * var(--SCALE));
}

#overlay_manager .overlay-secondary-button {
    flex: 1 1 calc( 180px * var(--SCALE));
    border: 1px solid #d1d5db;
    border-radius: calc( 10px * var(--SCALE));
    padding: calc( 10px * var(--SCALE)) calc( 14px * var(--SCALE));
    background-color: #ffffff;
    font-weight: 600;
    font-size: calc( 14px * var(--SCALE));
    color: #1f2937;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

#overlay_manager .overlay-secondary-button:hover,
#overlay_manager .overlay-secondary-button:focus-visible {
    background-color: #f3f4f6;
    border-color: #9ca3af;
    outline: none;
}

#overlay_manager .overlay-item label {
    font-weight: 600;
    font-size: calc( 13px * var(--SCALE));
    color: #334155;
}

#overlay_manager .overlay-item input[type="text"] {
    width: 100%;
    padding: calc( 6px * var(--SCALE)) calc( 8px * var(--SCALE));
    border-radius: calc( 8px * var(--SCALE));
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: #ffffff;
    color: #0f172a;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

#overlay_manager .overlay-item input[type="text"]:focus {
    outline: calc( 2px * var(--SCALE)) solid rgba(59, 130, 246, 0.65);
    outline-offset: calc( 1px * var(--SCALE));
    border-color: rgba(59, 130, 246, 0.8);
}

#overlay_manager .overlay-icon-button.overlay-color {
    position: relative;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.55);
    padding: calc( 4px * var(--SCALE));
    width: calc( 32px * var(--SCALE));
    height: calc( 32px * var(--SCALE));
    overflow: hidden;
}

#overlay_manager .overlay-icon-button.overlay-color::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--overlay-color, #2563eb);
    box-shadow: inset 0 0 0 calc( 1px * var(--SCALE)) rgba(15, 23, 42, 0.12);
}

#overlay_manager .overlay-icon-button.overlay-color:hover::after,
#overlay_manager .overlay-icon-button.overlay-color:focus-visible::after,
#overlay_manager .overlay-icon-button.overlay-color:focus-within::after {
    box-shadow: inset 0 0 0 calc( 2px * var(--SCALE)) rgba(15, 23, 42, 0.16);
}

#overlay_manager .overlay-icon-button.overlay-color input[type="color"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

#overlay_manager .overlay-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: calc( 8px * var(--SCALE));
}

#overlay_manager .overlay-control-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: calc( 6px * var(--SCALE));
}

#overlay_manager .overlay-control-group label {
    margin: 0;
}

#overlay_manager .overlay-controls .overlay-slider {
    flex: 1 1 140px;
}

#overlay_manager .overlay-controls input[type="range"] {
    width: 100%;
}

#overlay_manager .overlay-opacity-value {
    min-width: calc( 40px * var(--SCALE));
    text-align: right;
    font-size: calc( 13px * var(--SCALE));
    align-self: flex-end;
    color: #475569;
}

#overlay_manager .overlay-feature-names {
    font-size: calc( 13px * var(--SCALE));
    color: #475569;
    line-height: 1.4;
}

#overlay_manager .overlay-imagery-meta {
    font-size: calc( 12px * var(--SCALE));
    color: #64748b;
    line-height: 1.4;
}

#overlay_manager .overlay-imagery-hidden {
    font-size: calc( 12px * var(--SCALE));
    color: #dc2626;
    font-weight: 600;
    display: none;
}

#overlay_manager .overlay-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc( 12px * var(--SCALE));
}

#overlay_manager .overlay-item-name {
    font-weight: 600;
    font-size: calc( 15px * var(--SCALE));
    color: #0f172a;
    word-break: break-word;
}

#overlay_manager .overlay-item-actions {
    display: flex;
    gap: calc( 8px * var(--SCALE));
}

#overlay_manager .overlay-icon-button {
    width: calc( 32px * var(--SCALE));
    height: calc( 32px * var(--SCALE));
    border-radius: calc( 10px * var(--SCALE));
    border: 1px solid rgba(148, 163, 184, 0.65);
    background-color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    color: #0f172a;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#overlay_manager .overlay-icon-button:hover,
#overlay_manager .overlay-icon-button:focus-visible,
#overlay_manager .overlay-icon-button:focus-within {
    background-color: #f1f5f9;
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 calc( 6px * var(--SCALE)) calc( 16px * var(--SCALE)) rgba(15, 23, 42, 0.18);
    outline: none;
}

#overlay_manager .overlay-icon-button .material-icons {
    font-size: calc( 18px * var(--SCALE));
    line-height: 1;
    color: inherit;
}

#overlay_manager .overlay-dialog {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc( 24px * var(--SCALE));
    z-index: 2600;
}

#overlay_manager .overlay-dialog[hidden] {
    display: none;
}

#overlay_manager .overlay-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(calc( 4px * var(--SCALE)));
}

#overlay_manager .overlay-dialog-panel {
    position: relative;
    width: min( calc(520px * var(--SCALE)), 92vw);
    max-height: 90vh;
    background: #ffffff;
    border-radius: calc( 16px * var(--SCALE));
    box-shadow: 0 calc( 24px * var(--SCALE)) calc( 48px * var(--SCALE)) rgba(15, 23, 42, 0.25);
    padding: calc( 24px * var(--SCALE));
    display: flex;
    flex-direction: column;
    gap: calc( 16px * var(--SCALE));
    overflow: hidden;
}

#overlay_manager .overlay-dialog-title {
    margin: 0;
    font-size: calc( 20px * var(--SCALE));
    color: #0f172a;
}

#overlay_manager .overlay-dialog-close {
    position: absolute;
    top: calc( 16px * var(--SCALE));
    right: calc( 16px * var(--SCALE));
    border: none;
    background: rgba(226, 232, 240, 0.75);
    border-radius: 50%;
    width: calc( 32px * var(--SCALE));
    height: calc( 32px * var(--SCALE));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#overlay_manager .overlay-dialog-close:hover,
#overlay_manager .overlay-dialog-close:focus-visible {
    background: rgba(148, 163, 184, 0.6);
    transform: rotate(90deg);
    outline: none;
}

#overlay_manager .overlay-dialog-close .material-icons {
    font-size: calc( 18px * var(--SCALE));
    color: #0f172a;
}

#overlay_manager .overlay-dialog-summary {
    font-size: calc( 14px * var(--SCALE));
    color: #475569;
    line-height: 1.5;
}

body.overlay-action-open {
    overflow: hidden;
}

.overlay-action-backdrop {
    position: fixed;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.32) 0%, rgba(15, 23, 42, 0.18) 28%, rgba(15, 23, 42, 0.08) 55%, rgba(15, 23, 42, 0.0) 100%);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: calc( 32px * var(--SCALE));
    z-index: 3200;
}

.overlay-action-panel {
    position: relative;
    background: #ffffff;
    color: #0f172a;
    border-radius: calc( 16px * var(--SCALE));
    box-shadow: 0 calc( 32px * var(--SCALE)) calc( 60px * var(--SCALE)) rgba(15, 23, 42, 0.35);
    width: min(calc( 540px * var(--SCALE)), calc(100vw - calc( 32px * var(--SCALE))));
    max-height: calc(100vh - calc( 48px * var(--SCALE)));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.overlay-action-panel--dock-left {
    margin-left: 0;
    margin-top: calc( 12px * var(--SCALE));
    align-self: stretch;
    max-height: calc(100vh - calc( 64px * var(--SCALE)));
}

.overlay-action-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc( 16px * var(--SCALE));
    padding: calc( 20px * var(--SCALE)) calc( 24px * var(--SCALE));
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.overlay-action-header h2 {
    margin: 0;
    font-size: calc( 20px * var(--SCALE));
    font-weight: 600;
    color: inherit;
}

.overlay-action-close {
    border: none;
    background: rgba(226, 232, 240, 0.85);
    color: inherit;
    border-radius: 999px;
    width: calc( 32px * var(--SCALE));
    height: calc( 32px * var(--SCALE));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: calc( 20px * var(--SCALE));
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.overlay-action-close:hover,
.overlay-action-close:focus-visible {
    background: rgba(148, 163, 184, 0.75);
    transform: rotate(90deg);
    outline: none;
}

.overlay-action-body {
    padding: calc( 20px * var(--SCALE)) calc( 24px * var(--SCALE));
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: calc( 16px * var(--SCALE));
}

.overlay-action-footer {
    padding: calc( 16px * var(--SCALE)) calc( 24px * var(--SCALE));
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    display: flex;
    flex-direction: column;
    gap: calc( 12px * var(--SCALE));
    align-items: flex-start;
}

.overlay-action-form {
    display: flex;
    flex-direction: column;
    gap: calc( 16px * var(--SCALE));
}

.overlay-action-form fieldset {
    margin: 0;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: calc( 12px * var(--SCALE));
    padding: calc( 16px * var(--SCALE));
}

.overlay-action-form legend {
    padding: 0 calc( 6px * var(--SCALE));
    font-size: calc( 13px * var(--SCALE));
    color: #475569;
}

.overlay-action-form label {
    display: block;
    font-weight: 600;
    font-size: calc( 14px * var(--SCALE));
    margin-bottom: calc( 6px * var(--SCALE));
}

.overlay-action-form input[type="text"],
.overlay-action-form input[type="number"] {
    width: 100%;
    padding: calc( 8px * var(--SCALE)) calc( 10px * var(--SCALE));
    border-radius: calc( 10px * var(--SCALE));
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: #f8fafc;
    color: #0f172a;
    font-size: calc( 14px * var(--SCALE));
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.overlay-action-form input[type="text"]:focus,
.overlay-action-form input[type="number"]:focus,
.overlay-action-form input[type="range"]:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 0 calc( 2px * var(--SCALE)) rgba(59, 130, 246, 0.15);
}

.overlay-action-form input[type="range"] {
    width: 100%;
}

.overlay-transform-hint {
    margin: 0;
    margin-bottom: calc( 12px * var(--SCALE));
    padding: calc( 10px * var(--SCALE)) calc( 12px * var(--SCALE));
    background: rgba(226, 232, 240, 0.6);
    color: #1e293b;
    border-radius: calc( 12px * var(--SCALE));
    font-size: calc( 13px * var(--SCALE));
}

.overlay-transform-status {
    margin: 0;
    margin-bottom: calc( 16px * var(--SCALE));
    padding: calc( 10px * var(--SCALE)) calc( 12px * var(--SCALE));
    border-left: calc( 3px * var(--SCALE)) solid #38bdf8;
    border-radius: calc( 10px * var(--SCALE));
    background: rgba(191, 219, 254, 0.35);
    color: #0f172a;
    font-weight: 600;
    font-size: calc( 13px * var(--SCALE));
}

.overlay-transform-status--active {
    border-left-color: #0d9488;
    background: rgba(45, 212, 191, 0.18);
    color: #0f766e;
}

.overlay-transform-status--inactive {
    border-left-color: #94a3b8;
    background: rgba(226, 232, 240, 0.35);
    color: #475569;
}

.overlay-transform-status--error {
    border-left-color: #dc2626;
    background: rgba(254, 202, 202, 0.32);
    color: #b91c1c;
}

.overlay-transform-metrics {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: calc( 6px * var(--SCALE)) calc( 16px * var(--SCALE));
    align-items: center;
    margin: 0;
    margin-bottom: calc( 20px * var(--SCALE));
}

.overlay-transform-metrics dt {
    font-weight: 600;
    font-size: calc( 13px * var(--SCALE));
    color: #1e293b;
}

.overlay-transform-metrics dd {
    margin: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: calc( 13px * var(--SCALE));
    color: #0f172a;
}

.overlay-transform-actions {
    display: flex;
    flex-wrap: wrap;
    gap: calc( 10px * var(--SCALE));
    margin-bottom: calc( 20px * var(--SCALE));
}

.overlay-transform-actions .overlay-action-secondary {
    flex: 1 1 calc( 45%);
    min-width: calc( 160px * var(--SCALE));
}

@media (max-width: 768px) {
    .overlay-action-backdrop {
        background: rgba(15, 23, 42, 0.45);
        justify-content: center;
        align-items: center;
        padding: calc( 16px * var(--SCALE));
    }

    .overlay-action-panel--dock-left {
        max-height: calc(100vh - calc( 32px * var(--SCALE)));
    }

    .overlay-transform-actions .overlay-action-secondary {
        flex: 1 1 100%;
        min-width: auto;
    }
}

.overlay-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: calc( 12px * var(--SCALE));
}

.overlay-action-panel button {
    font-size: calc( 14px * var(--SCALE));
    font-weight: 600;
    border-radius: calc( 10px * var(--SCALE));
    border: none;
    padding: calc( 10px * var(--SCALE)) calc( 18px * var(--SCALE));
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.overlay-action-panel button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.overlay-action-primary {
    background: #2563eb;
    color: #f8fafc;
}

.overlay-action-primary:hover,
.overlay-action-primary:focus-visible {
    background: #1d4ed8;
    box-shadow: 0 calc( 8px * var(--SCALE)) calc( 20px * var(--SCALE)) rgba(37, 99, 235, 0.3);
    outline: none;
}

.overlay-action-secondary {
    background: #e2e8f0;
    color: #0f172a;
}

.overlay-action-secondary:hover,
.overlay-action-secondary:focus-visible {
    background: #cbd5f5;
    outline: none;
}

.overlay-action-danger {
    background: #ef4444;
    color: #ffffff;
}

.overlay-action-danger:hover,
.overlay-action-danger:focus-visible {
    background: #dc2626;
    outline: none;
    box-shadow: 0 calc( 8px * var(--SCALE)) calc( 20px * var(--SCALE)) rgba(220, 38, 38, 0.35);
}

.overlay-action-feedback {
    margin: 0;
    min-height: calc( 20px * var(--SCALE));
    font-size: calc( 14px * var(--SCALE));
    color: #0ea5e9;
}

.overlay-action-feedback.error {
    color: #f87171;
}

.overlay-action-summary {
    margin: 0;
    font-size: calc( 14px * var(--SCALE));
    color: #475569;
}

.overlay-action-warning {
    margin: 0;
    font-size: calc( 14px * var(--SCALE));
    color: #ca8a04;
}

.overlay-metadata-table {
    max-height: calc( 320px * var(--SCALE));
    overflow: auto;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: calc( 12px * var(--SCALE));
}

.overlay-metadata-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: calc( 14px * var(--SCALE));
}

.overlay-metadata-table th,
.overlay-metadata-table td {
    padding: calc( 10px * var(--SCALE)) calc( 12px * var(--SCALE));
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    vertical-align: top;
    text-align: left;
    color: #0f172a;
}

.overlay-metadata-table th {
    width: 40%;
    font-weight: 600;
    background: rgba(226, 232, 240, 0.6);
}

.overlay-metadata-table tr:last-child th,
.overlay-metadata-table tr:last-child td {
    border-bottom: none;
}

#overlay_manager .overlay-dialog-hint {
    font-size: calc( 13px * var(--SCALE));
    color: #1d4ed8;
    background: rgba(219, 234, 254, 0.8);
    border-radius: calc( 10px * var(--SCALE));
    padding: calc( 10px * var(--SCALE)) calc( 14px * var(--SCALE));
}

#overlay_manager .overlay-dialog-body {
    display: flex;
    flex-direction: column;
    gap: calc( 12px * var(--SCALE));
    overflow-y: auto;
    max-height: calc( 55vh);
    padding-right: calc( 2px * var(--SCALE));
}

#overlay_manager .overlay-dialog-scroll {
    overflow-y: auto;
    max-height: calc( 60vh);
    padding-right: calc( 4px * var(--SCALE));
}

#overlay_manager .overlay-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: calc( 8px * var(--SCALE));
    align-items: center;
    justify-content: flex-end;
}

#overlay_manager .overlay-dialog-feedback {
    flex: 1 1 auto;
    font-size: calc( 13px * var(--SCALE));
    color: #475569;
    min-height: calc( 18px * var(--SCALE));
}

#overlay_manager .overlay-dialog-feedback.overlay-dialog-feedback--success {
    color: #047857;
}

#overlay_manager .overlay-dialog-feedback.overlay-dialog-feedback--error {
    color: #b91c1c;
}

#overlay_manager .overlay-field {
    display: flex;
    flex-direction: column;
    gap: calc( 6px * var(--SCALE));
}

#overlay_manager .overlay-field[hidden] {
    display: none;
}

#overlay_manager .overlay-field label {
    font-size: calc( 13px * var(--SCALE));
    font-weight: 600;
    color: #334155;
}

#overlay_manager .overlay-field-control {
    display: flex;
    align-items: center;
    gap: calc( 10px * var(--SCALE));
}

#overlay_manager .overlay-field-control input[type="range"] {
    flex: 1 1 auto;
}

#overlay_manager .overlay-field-value {
    font-weight: 600;
    font-size: calc( 13px * var(--SCALE));
    min-width: calc( 60px * var(--SCALE));
    text-align: right;
    color: #0f172a;
}

#overlay_manager .overlay-dialog-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: calc( 13px * var(--SCALE));
    color: #1e293b;
}

#overlay_manager .overlay-dialog-body th,
#overlay_manager .overlay-dialog-body td {
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: calc( 8px * var(--SCALE));
    text-align: left;
    vertical-align: top;
}

#overlay_manager .overlay-dialog-body th {
    background: rgba(241, 245, 249, 0.8);
    font-weight: 600;
}

#overlay_manager .overlay-dialog-body pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

#overlay_manager .overlay-icon-button.overlay-delete {
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.4);
}

#overlay_manager .overlay-icon-button.overlay-delete:hover,
#overlay_manager .overlay-icon-button.overlay-delete:focus-visible {
    background-color: #fee2e2;
    border-color: rgba(220, 38, 38, 0.75);
    color: #991b1b;
}

#overlay_manager .overlay-name-input {
    display: none;
    margin-top: calc( 8px * var(--SCALE));
}

#overlay_manager .overlay-name-input.is-visible {
    display: block;
}

.infoblockCloseBox {
    position: absolute;
    right: calc( 20px * var(--SCALE));
    top: calc( 8px * var(--SCALE));
    background-image: url('images/close-settings.png');
    background-size: cover;
    width: calc( 20px * var(--SCALE));
    height: calc( 20px * var(--SCALE));
    cursor: pointer;
    z-index: 99;
}

.settingsText {
    line-height: calc( 20px * var(--SCALE));
    display: table-cell;
}

#altitude_chart {
    position: fixed;
    left: calc((100vw - var(--sidebar-visible-width)) / 2);
    transform: translateX(-50%);
    bottom: calc( 35px * var(--SCALE));
    width: min(
        max(
            calc(100vw - var(--sidebar-visible-width) - calc( 260px * var(--SCALE))),
            calc(280px * var(--SCALE))
        ),
        calc(800px * var(--SCALE))
    );
    padding: 0 calc( 20px * var(--SCALE));
    box-sizing: border-box;
    background-color: transparent !important;
    pointer-events: none;
    z-index: 1000;
}

#altitude_chart_button {
    display: block;
    width: 100%;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    height: 0;
    padding: 0;
    padding-bottom: calc(100% * 56 / 1815);
    pointer-events: none;
    border: none;
    outline: none;
}



#selected_flightaware_link a {
    background-color: #67b6c3;
    color: white;
    text-decoration: none;
    padding: calc( 4px * var(--SCALE));
    line-height: calc( 22px * var(--SCALE));
    border-radius: calc( 4px * var(--SCALE));
}
.bottom-info-container {
    padding-top: calc( 10px * var(--SCALE));
    padding-bottom: calc( 10px * var(--SCALE));
    text-align: center;
    color: var(--TXTCOLOR1);
    line-height: calc( 18px * var(--SCALE));
}
.bottom-info-container img {
    vertical-align: middle;
}
.bottom-info-container .bottom-info-text {
    vertical-align: middle;
    display: inline;
}

.ui-tabs {
    background-color: var(--BGCOLOR1);
}
.ui-tabs-nav {
    background-color: var(--BGCOLOR2);
}
.ui-tabs-panel {
    background-color: var(--BGCOLOR1);
}
.greyButton {
    background-color: var(--BGCOLOR2);
    cursor: pointer;
    padding: calc( 4px * var(--SCALE));
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: calc( 15px * var(--SCALE));
    font-weight: bold;
    color: var(--TXTCOLOR1);
}
.greyButton:after {
    content: '\02795\FE0E'; /* Unicode character for "plus" sign (+) */
    float: right;
    margin-left: calc( 5px * var(--SCALE));
}
.greyButton.active:after {
    content: "\2796\FE0E"; /* Unicode character for "minus" sign (-) */
}

.ui-tabs-nav li a:focus {
    outline: none;
}

.ui-tabs .ui-tabs-panel {
    padding: 1em 0.5em;
}
.ui-tabs .ui-tabs-nav {
    padding: 2px;
    margin: 1px;
    margin-bottom: 1px;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
    padding-bottom: 0px;
}
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr {
    border-radius: 3px;
}

.buttonFilter {
    list-style-type: none;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.ui-widget-content .ui-selectable .ui-selected {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.buttonFilter li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #374151;
    border: 1px solid #4b5563;
    border-radius: 0.375rem;
    color: #e5e7eb;
    font-size: 0.875rem;
    cursor: pointer;
}
.buttonFilter li:hover {
    background-color: #4b5563;
}
.color-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

#sortableColumns {
    list-style-type: none;
    margin: 0;
    padding: 0;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
    grid-auto-rows: minmax(28px, auto);
}

#sortableColumns label {
    width: 100%;
    min-width: 115px;
    min-height: 28px;
}
#copyrightInfo {
  position: Relative;
  font-size: var(--FS1);

}
#selected_photo{
  text-align: center;
  display: block;
}
.ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default, .ui-button, html .ui-button.ui-state-disabled:hover, html .ui-button.ui-state-disabled:active {
  background: var(--BGCOLOR1);
  border: none;
}
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active, a.ui-button:active, .ui-button:active, .ui-button.ui-state-active:hover{
  background: #3d7382;
}
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited, a.ui-button, a:link.ui-button, a:visited.ui-button, .ui-button {
  color:var(--TXTCOLOR2);
}
 .ui-widget-header .ui-state-default, .ui-button, html .ui-button.ui-state-disabled:hover, html .ui-button.ui-state-disabled:active {
  color:var(--TXTCOLOR2);
}
.ui-widget-header, .ui-widget.ui-widget-content {
    border: none;
}
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default, .ui-button, html .ui-button.ui-state-disabled:hover, html .ui-button.ui-state-disabled:active {
    color:var(--TXTCOLOR2);
}
.ui-widget-content {
  color:var(--TXTCOLOR2);
}

.ui-slider {
    position: relative;
    height: calc( 6px * var(--SCALE));
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.9);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

.ui-slider .ui-slider-range {
    background: #3b82f6;
    border-radius: 999px;
}

.ui-slider .ui-slider-handle {
    width: calc( 16px * var(--SCALE));
    height: calc( 16px * var(--SCALE));
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.9);
    background: #ffffff;
    box-shadow: 0 calc( 6px * var(--SCALE)) calc( 14px * var(--SCALE)) rgba(15, 23, 42, 0.18);
    top: 50%;
    transform: translate(-50%, -50%);
}

.ui-slider .ui-slider-handle:focus-visible {
    outline: calc( 2px * var(--SCALE)) solid rgba(59, 130, 246, 0.35);
}

.ui-slider-horizontal {
    height: calc( 6px * var(--SCALE));
}

.ui-slider-horizontal .ui-slider-handle {
    margin-left: 0;
}

.ui-slider-vertical {
    width: calc( 6px * var(--SCALE));
}

.ui-slider-vertical .ui-slider-handle {
    left: 50%;
    margin-left: 0;
    margin-bottom: 0;
}


input{
  color:var(--TXTCOLOR1);
}
#histDatePicker{
  background: var(--BGCOLOR1);
}

#replayBar {
  background: var(--BGCOLOR1);
  display: none;
  width: calc(100% - 80px);
  padding-right: 80px;
  position: absolute;
  height: 10px;
  bottom: 0%;
  grid-template-columns: 1fr 1.5fr 5fr 2fr;
  grid-template-rows: 20px 40px 20px 20px;
  justify-items: center;
  align-items: center;
  grid-template-areas:
    "timezone dateHint timeHint speedHint"
    "play datepicker hours speedSelect"
    ". dateHintLocal minutes loading "
    ". . . .";
}

#replayLoading {
  grid-area: loading;
}

#replayTimeZone{
  grid-area: timezone;
}
#replayPlay{
  grid-area: play;
}
#replayDatepicker{
  grid-area: datepicker;
}
#hourSelect{
  width: 90%;
  grid-area: hours;
}
#minuteSelect{
  width: 90%;
  grid-area: minutes;
}
#replaySpeedSelect{
  grid-area: speedSelect;
  width: 90%;
}
#replayTimeHint{
   grid-area: timeHint;
}
#replayDateHintLocal{
  grid-area: dateHintLocal;
}
#replayDateHint{
  grid-area: dateHint;
}
#replaySpeedHint{
  grid-area: speedHint;
}

/* modern tab styling */
#tabs {
  background-color: #1f2937;
  border-radius: 0.5rem;
  padding: 0.5rem;
}
#tabs .ui-tabs-nav {
  background-color: #374151;
  border-radius: 0.375rem;
  padding: 0.25rem;
}
#tabs .ui-tabs-nav li a {
  color: #f3f4f6;
  background-color: #4b5563;
  border-radius: 0.375rem;
  padding: 0.25rem 0.75rem;
}
#tabs .ui-tabs-nav li a:hover {
  background-color: #6b7280;
}
#tabs .ui-tabs-nav li.ui-tabs-active a {
  background-color: #2563eb;
  color: #ffffff;
  border-radius: 0.375rem;
}
#tabs .ui-tabs-panel {
  background-color: #1f2937;
}

.layer-switcher.shown {
  overflow: visible !important;
} 

.layer-switcher .group button {
    background-image: url('../images/toggle_sidebar.svg')!important;
    background-size: 12px !important;
    background-position: center !important;
    rotate: 90deg !important;
}

.layer-switcher .group.layer-switcher-close button {
  transform: rotate(-90deg) !important;
}

.layer-switcher input {
      margin: 3px !important;
}

.layer-switcher ul {
      margin: 0 !important;
      padding-left: calc(10px * var(--SCALE));
}

/* Autel Info Popup */
.autel-info-overlay {
    position: absolute;
    background-color: rgba(15, 23, 42, var(--INFOBLOCK-OPACITY));
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    border: none;
    padding: 0;
    min-width: 250px;
    max-width: 350px;
    font-family: sans-serif;
    font-size: 13px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    color: #e2e8f0;
}

.autel-info-popup {
    padding: 12px 16px;
    position: relative;
    font-family: "Inter", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
}

.autel-info-popup h3 {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: bold;
    color: #e2e8f0;
}

.autel-info-popup p {
    margin: 6px 0;
    padding: 0;
    line-height: 1.4;
    color: #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    column-gap: 12px;
}

.autel-info-popup strong {
    font-weight: 600;
    color: #cbd5e1;
    min-width: 100px;
    display: inline-block;
    flex-shrink: 0;
}

.autel-info-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 20px;
    font-weight: bold;
    color: #cbd5e1;
    cursor: pointer;
    line-height: 1;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.autel-info-close:hover {
    background-color: rgba(103, 182, 195, 0.15);
    color: #f8fafc;
}

.autel-info-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    cursor: grab;
    user-select: none;
    padding-bottom: 8px;
    margin-bottom: 8px;
    padding-right: 32px;
    border-bottom: 2px solid #67b6c3;
}

.autel-info-header h3 {
    margin: 0;
    flex: 1;
}

.autel-info-header.is-dragging {
    cursor: grabbing;
}

.autel-info-toggle {
    background: transparent;
    color: #e2e8f0;
    border: none;
    border-radius: 999px;
    padding: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    font-size: 16px;
    line-height: 1;
    transform: rotate(0deg);
}

.autel-info-toggle:hover {
    color: #67b6c3;
}

.autel-info-toggle[aria-expanded="true"] {
    transform: rotate(180deg);
}

.autel-info-toggle {
    transition: color 0.2s ease, transform 0.2s ease;
}

.autel-info-summary,
.autel-info-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.autel-info-divider {
    border: none;
    border-top: 1px solid rgba(226, 232, 240, 0.25);
    margin: 8px 0;
}

.autel-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    column-gap: 12px;
    font-weight: 600;
}

.autel-info-label {
    color: #cbd5e1;
    font-weight: 700;
}

.autel-info-value {
    color: #e2e8f0;
    text-align: right;
}

.autel-info-position {
    white-space: nowrap;
}

.autel-info-title {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.autel-info-title:hover,
.autel-info-title:focus-visible {
    color: #67b6c3;
    outline: none;
}

.autel-info-serial {
    color: #e2e8f0;
}

.autel-info-details[hidden] {
    display: none;
}

.autel-info-qr {
    display: flex;
    justify-content: center;
    margin-top: 6px;
}
