:root {
    --SCALE: 1;

    /* Surfaces: softer, cleaner neutrals than the old flat greys */
    --BGCOLOR1: #f5f7f9;   /* primary surface (panels, sidebar)   */
    --BGCOLOR2: #e2e8ec;   /* secondary surface (inputs, tabs bar) */

    /* Brand accent: the original tar1090 teal, kept as identity, plus tints/shades */
    --ACCENT: #00697e;
    --ACCENT-STRONG: #004c5c;
    --ACCENT-SOFT: #e0eef1;
    --ACCENT-CONTRAST: #ffffff;

    --FS1: calc( 10px * var(--SCALE));
    --FS2: calc( 13px * var(--SCALE));
    --FS3: calc( 17px * var(--SCALE));

    --TXTCOLOR1: #004c5c;
    --TXTCOLOR2: #17242a;
    --TXTCOLOR3: #33434b;

    /* Modern design tokens (new): consistent radius, elevation, borders, motion */
    --RADIUS-SM: calc( 4px * var(--SCALE));
    --RADIUS-MD: calc( 8px * var(--SCALE));
    --RADIUS-LG: calc( 12px * var(--SCALE));
    --BORDER-COLOR: rgba(0, 0, 0, 0.10);
    --SHADOW-1: 0 1px 2px rgba(16, 34, 40, 0.08), 0 1px 3px rgba(16, 34, 40, 0.10);
    --SHADOW-2: 0 4px 10px rgba(16, 34, 40, 0.10), 0 2px 4px rgba(16, 34, 40, 0.08);
    --SHADOW-3: 0 10px 30px rgba(16, 34, 40, 0.18), 0 4px 10px rgba(16, 34, 40, 0.12);
    --TRANSITION: 140ms ease;
    --FONT-STACK: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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: var(--FONT-STACK);
    font-size: var(--FS2);
    overflow: hidden;
    height: 100%;
    color: var(--TXTCOLOR2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

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

#layout_container {
    display: flex;
    height: 100%;
}

#selected_infoblock {
    position: absolute;
    left: 0px;
    bottom: 0px;
    width:  calc(180px * var(--SCALE));
    height: 100%;
    overflow: auto;
    z-index: 1;
    background-color: var(--BGCOLOR1);
}
.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));
    overflow: auto;
}

#sidebar_container {
    display: flex;
    flex-direction: column;
    left: calc( 0px * var(--SCALE)) !important;
    height: 100%;
}


#map_container {
    flex: 1 1 auto;
    position: relative;
    height: 100%;
}

#map_canvas {
    position: absolute;
    width: 100%;
    height: 100%;
}
#iconTestCanvas {
    position: absolute;
    width: 100%;
    height: 100%;
}

.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;
    background-size: calc( 26px * var(--SCALE)) calc( 30px * var(--SCALE));
    background-repeat: no-repeat;
    background-position: center;

    border: none;
}

#toggle_sidebar_button.show_sidebar {
    transform: scaleX(-1);
    background-image: url("images/hide_sidebar.png");
}

#toggle_sidebar_button.hide_sidebar {
    background-image: url("images/hide_sidebar.png");
}

#shrink_sidebar_button {
    background-image: url("images/hide_sidebar.png");
}

#expand_sidebar_button {
    transform: scaleX(-1);
    background-image: url("images/hide_sidebar.png");
}


#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: block;
    position: absolute;
    z-index: 99;
    top:  calc( 5px * var(--SCALE));
    left: calc( 0px * var(--SCALE));
    float: right;
    width: calc( 30px * var(--SCALE));
    height: calc( 30px * var(--SCALE));
    background-size: calc( 30px * var(--SCALE)) calc( 30px * var(--SCALE));
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    background-image: url("images/toggle-width.png");
    background-size: cover;
    transform: scaleX(-1);
}

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

/* remove the blue highlighting around the map buttons */
.ol-control button {
    outline: none;
    z-index: 999;
}

.ol-zoom-in {
    background-image: url("images/zoom-in.png");
    background-size: cover;
    color:transparent !important;
    width: calc( 25px * var(--SCALE)) !important;
    height: calc( 25px * var(--SCALE)) !important;
    background-color: transparent !important;
    margin-bottom: calc( 5px * var(--SCALE)) !important;
}

.ol-zoom-out {
    background-image: url("images/zoom-out.png");
    background-size: cover;
    color:transparent !important;
    width: calc( 25px * var(--SCALE)) !important;
    height: calc( 25px * var(--SCALE)) !important;
    background-color: transparent !important;
}

.ol-zoom {
    background-color: transparent !important;
    left: calc(100% - calc( 65px * var(--SCALE)));
    top: calc(100% - calc( 85px * var(--SCALE)));
}

.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%}
#loader_progress { width:  100%; height: 100%; position: absolute; }


.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));
    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: var(--FS2); }

.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: calc( 50px * var(--SCALE));
    height:  calc(15px * var(--SCALE));
    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);
    color:var(--TXTCOLOR2);
    background-color: var(--BGCOLOR2);
    border-color: var(--BGCOLOR1);
}
.formButton:disabled {
    color:var(--TXTCOLOR3);
}

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

.layer-switcher {
    top: calc( 3px * var(--SCALE)) !important;
    right: calc( 44px * var(--SCALE)) !important;
    z-index: 999;
}
.layer-switcher button {
    background-size: calc( 26px * var(--SCALE)) calc( 26px * var(--SCALE));
    background-repeat: no-repeat;
    background-position: center;
    width: calc( 30px * var(--SCALE));
    height: calc( 30px * var(--SCALE));
}
.layer-switcher !.shown {
    top: calc( 3px * var(--SCALE)) !important;
    right: calc( 44px * var(--SCALE)) !important;
    width: calc( 32px * var(--SCALE));
    height: calc( 32px * var(--SCALE));
    z-index: 999;
}
.layer-switcher.shown .panel {
    overflow-y: auto;
    height: 95vh;
}

/* 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: 1000px) {
    .dateTime {
        display: none;
    }
}

.sectionTitle {
    width: 100%;
    text-transform: uppercase;
    text-align: center;
    color: #e8e8e8;
    background: #003f4b;
}

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

.legend
{
    font-size: 110%;
    color:var(--TXTCOLOR2);
    display: flex;
    flex-wrap: wrap;
    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( 0px * var(--SCALE));
    top:  calc( 0px * var(--SCALE));
    width: calc( 38px * var(--SCALE));
    z-index: 9;
}
#header_top {
    text-align: right;
    position: absolute;
    right: calc( 94px * var(--SCALE));
    top: calc( 0px * var(--SCALE));
    height: calc( 38px * var(--SCALE));
    z-index: 9;
}

.svgButton {
    background-color: var(--ACCENT);
    width: calc( 27px * var(--SCALE));
    height: calc( 27px * var(--SCALE));
    cursor: pointer;
    background-position: center;
    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: url('images/cog-white.svg');
    background-size: 120%;
}

.replayButton {
    background-image: url('images/replay-white.svg');
}


.button {
    background-color: var(--ACCENT);
    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;
}


.buttonContainer {
    display: block;
    margin: calc( 1px * var(--SCALE));
    text-align: center;
}
.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));
}

.activeButton {
 color:#000
}
.inActiveButton {
 color:#fff
}

#highlighted_infoblock {
    background-color: var(--BGCOLOR1);
    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: calc( 4px * var(--SCALE)) calc( 4px * var(--SCALE)) calc( 10px * var(--SCALE)) #444444;
    cursor: pointer;
    z-index: 9999;
    display: 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));
}

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



.legendTitle {
    line-height: calc( 19px * var(--SCALE));
    padding-right: calc( 3px * var(--SCALE));
    padding-left: calc( 3px * var(--SCALE));
    margin: calc( 2px * var(--SCALE));
}

#settings_infoblock {
    position: fixed;
    top: 1%;
    left: 1%;
    overflow: auto;
    max-height: 90%;
    box-shadow: calc( 4px * var(--SCALE)) calc( 4px * var(--SCALE)) calc( 10px * var(--SCALE)) #444444;
    padding: calc( 20px * var(--SCALE));
    z-index: 9999;
    display: none;
    background-color: var(--BGCOLOR1);
}

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

.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;
    cursor: pointer;
}

.settingsCheckboxChecked {
    background-image: url('images/box-checked.png') !important;
}

.settingsCloseBox {
    position: absolute;
    right: calc( 8px * 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;
}

.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 {
    float: right;
    width: calc(100% - calc( 5px * var(--SCALE)));
    max-width:  calc(800px * var(--SCALE));
    right: calc( 85px * var(--SCALE));
    bottom: calc( 35px * var(--SCALE));
    background-color: transparent !important;
}

#altitude_chart_button {
    background-size: cover;
    background-color: transparent;
    width: 100%;
    height: 0;
    padding: 0;
    padding-bottom: calc(100% * 56 / 1815);
}


#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;
    width: calc( 240px * var(--SCALE));
    cursor: pointer;
}

.ui-widget-content .ui-selectable .ui-selected {
    border-color: #cc6600;
}

.buttonFilter li {
    border-width: 2px;
    border-color: var(--BGCOLOR2);
    margin-right: 5px;
    margin-bottom: 5px;
    padding: 1px;
    float: left;
    width: calc( 85px * var(--SCALE));
    color:var(--TXTCOLOR2);
    font-size: var(--FS2);
    text-align: center;
}

#sortableColumns {
    list-style-type: none;
    margin: 0;
    padding: 0;
    max-width: calc( 2 * 130px * var(--SCALE));
}

#sortableColumns li {
    margin: 3px 3px 3px 3px;
    padding: calc( 0px * var(--SCALE));
    float: left;
    width: calc( 120px * var(--SCALE));
    border-color: var(--ACCENT);
    background-color: var(--BGCOLOR2);
}
#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 {
    background-color: var(--BGCOLOR2);
}
.ui-slider .ui-slider-handle {
    background-color: rgb(0, 115, 222);
}


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

/* =========================================================================
   MODERNIZATION LAYER (Track 1)
   Appended intentionally: these rules refine the visual treatment of the
   existing markup (buttons, panels, tabs, table, forms) and add responsive
   breakpoints + an optional dark theme. No markup or JS behavior changes.
   Rules are additive and rely on the CSS-variable design tokens in :root.
   ========================================================================= */

/* ---- Header / map control buttons -------------------------------------- */
.button {
    background-color: var(--ACCENT);
    color: var(--ACCENT-CONTRAST);
    border-radius: var(--RADIUS-SM);
    box-shadow: var(--SHADOW-1);
    transition: background-color var(--TRANSITION), transform var(--TRANSITION), box-shadow var(--TRANSITION);
}
.button:hover {
    background-color: var(--ACCENT-STRONG);
    box-shadow: var(--SHADOW-2);
}
.button:active {
    transform: translateY(1px);
    box-shadow: var(--SHADOW-1);
}
/* Active state: light accent fill with dark text for a clear on/off read */
.activeButton {
    background-color: var(--ACCENT-SOFT) !important;
    color: var(--ACCENT-STRONG);
}

.svgButton {
    border-radius: var(--RADIUS-SM);
    transition: background-color var(--TRANSITION), box-shadow var(--TRANSITION);
}
.svgButton:hover {
    box-shadow: var(--SHADOW-1);
    filter: brightness(1.08);
}

.sidebar_button {
    border-radius: var(--RADIUS-SM);
    transition: background-color var(--TRANSITION);
}
.sidebar_button:hover {
    background-color: rgba(255, 255, 255, 0.35);
}

/* ---- Floating panels: soften edges and use layered elevation ----------- */
#highlighted_infoblock,
#settings_infoblock {
    border-radius: var(--RADIUS-LG);
    box-shadow: var(--SHADOW-3);
    border: 1px solid var(--BORDER-COLOR);
}

#selected_infoblock {
    box-shadow: var(--SHADOW-2);
    border-right: 1px solid var(--BORDER-COLOR);
}

.infoBlockSection {
    border-bottom: 1px solid var(--BORDER-COLOR);
}

/* ---- Sidebar --------------------------------------------------------- */
#sidebar_container {
    box-shadow: var(--SHADOW-2);
    border-left: 1px solid var(--BORDER-COLOR);
}

/* ---- Aircraft table: modern zebra + hover, sticky accent header -------- */
.aircraft_table_header {
    background-color: var(--ACCENT);
    box-shadow: 0 2px 4px rgba(16, 34, 40, 0.25);
    letter-spacing: 0.02em;
}
#planesTable tbody tr {
    transition: background-color var(--TRANSITION);
}
#planesTable tbody tr:hover {
    background-color: var(--ACCENT-SOFT) !important;
}

/* ---- Form controls: inputs, selects, buttons --------------------------- */
select,
input[type="text"],
input[type="number"],
.searchInput,
.altitudeFilterInput {
    border: 1px solid var(--BORDER-COLOR);
    border-radius: var(--RADIUS-SM);
    background-color: #ffffff;
    color: var(--TXTCOLOR2);
    padding: calc(2px * var(--SCALE)) calc(6px * var(--SCALE));
    transition: border-color var(--TRANSITION), box-shadow var(--TRANSITION);
}
select:focus,
input[type="text"]:focus,
input[type="number"]:focus,
.searchInput:focus,
.altitudeFilterInput:focus {
    outline: none;
    border-color: var(--ACCENT);
    box-shadow: 0 0 0 2px var(--ACCENT-SOFT);
}

.formButton,
.sidebarButton {
    border: 1px solid var(--BORDER-COLOR);
    border-radius: var(--RADIUS-SM);
    padding: calc(4px * var(--SCALE)) calc(10px * var(--SCALE));
    cursor: pointer;
    transition: background-color var(--TRANSITION), box-shadow var(--TRANSITION);
}
.formButton {
    background-color: var(--ACCENT);
    color: var(--ACCENT-CONTRAST);
}
.formButton:hover:not(:disabled) {
    background-color: var(--ACCENT-STRONG);
    box-shadow: var(--SHADOW-1);
}
.formButton:disabled {
    opacity: 0.55;
    cursor: default;
}

/* ---- jQuery UI tabs: flatter, accent-aware ----------------------------- */
.ui-tabs .ui-tabs-nav {
    background-color: transparent;
    border-bottom: 1px solid var(--BORDER-COLOR);
}
.ui-tabs-nav {
    background-color: transparent;
}
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
    border-radius: var(--RADIUS-SM) var(--RADIUS-SM) 0 0;
    transition: background-color var(--TRANSITION);
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active,
.ui-state-active,
.ui-widget-content .ui-state-active {
    background: var(--ACCENT-SOFT);
    border-bottom: 2px solid var(--ACCENT);
}
.ui-slider .ui-slider-handle {
    background-color: var(--ACCENT);
    border-radius: 50%;
    box-shadow: var(--SHADOW-1);
    cursor: pointer;
}

.greyButton {
    border-radius: var(--RADIUS-SM);
    transition: background-color var(--TRANSITION);
}
.greyButton:hover {
    background-color: var(--ACCENT-SOFT);
}

/* =========================================================================
   RESPONSIVE BREAKPOINTS (Track 1)
   The app previously relied on UA sniffing + a global --SCALE with no working
   media queries. These breakpoints let the sidebar / info panels reflow on
   small screens. Layout only — no elements are hidden that carry function.
   ========================================================================= */

/* Tablet and below: narrow the fixed-width selected info panel a touch */
@media screen and (max-width: 900px) {
    #selected_infoblock {
        width: calc(160px * var(--SCALE));
    }
    #highlighted_infoblock {
        left: calc(30px * var(--SCALE));
        top: calc(50px * var(--SCALE));
    }
}

/* Phones: let the sidebar take the full width so the table is usable,
   and let floating panels use the viewport width instead of overflowing. */
@media screen and (max-width: 600px) {
    #sidebar_container {
        max-width: 100%;
    }
    #selected_infoblock {
        width: 68vw;
        max-width: calc(220px * var(--SCALE));
    }
    #settings_infoblock {
        left: 2%;
        right: 2%;
        width: 96%;
        max-width: none;
        padding: calc(14px * var(--SCALE));
    }
    .settingsColumn {
        display: block;
        width: 100%;
    }
    #highlighted_infoblock {
        left: 50%;
        transform: translateX(-50%);
        max-width: 90vw;
    }
    /* Replay bar was a fixed grid; let it wrap on very small screens */
    #replayBar {
        width: calc(100% - 44px);
        padding-right: 44px;
    }
}

/* Coarse-pointer (touch) devices: enlarge hit targets regardless of width */
@media (pointer: coarse) {
    .button,
    .svgButton,
    .sidebar_button {
        min-width: calc(34px * var(--SCALE));
        min-height: calc(34px * var(--SCALE));
    }
    #planesTable tbody tr {
        height: calc(var(--FS2) + 10px);
    }
}

/* =========================================================================
   DARK THEME (Track 1)
   The app already ships a "Dark Mode" toggle (settings panel) implemented in
   script.js, which sets the palette tokens (--BGCOLOR*, --ACCENT*, --TXTCOLOR*,
   --BORDER-COLOR) as inline styles on :root. Those JS values were modernized to
   match the light tokens above and a coordinated dark palette, so dark mode now
   inherits every modernization rule in this file automatically. The rules below
   only cover the few surfaces the token swap alone doesn't reach.
   ========================================================================= */

/* Elevation reads better on dark surfaces with deeper shadows. Scoped to the
   darkMode toggle's effect via a luminance-independent hook: when the accent
   soft tint is dark, inputs need a darker fill for contrast. */
.aircraft_table_header {
    /* header text stays light on the accent fill in both themes */
    color: #ffffff;
}

/* =========================================================================
   AIRCRAFT PANEL / CARD LIST (AeroAPI enrichment)
   A modern alternative to the dense table rows. Uses the existing design
   tokens so it inherits both light and dark themes automatically. Populated
   by aeroapi-panel.js from the live plane objects; enriched via the /aeroapi
   proxy (route + airframe) and planespotters (thumbnail).
   ========================================================================= */
.ac-panel-list {
    display: flex;
    flex-direction: column;
    gap: calc(8px * var(--SCALE));
    padding: calc(8px * var(--SCALE));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    width: 100%;
    max-height: 70vh;
}

.ac-card {
    display: flex;
    align-items: stretch;
    gap: calc(10px * var(--SCALE));
    background: var(--BGCOLOR1);
    border: 1px solid var(--BORDER-COLOR);
    border-radius: var(--RADIUS-MD);
    box-shadow: var(--SHADOW-1);
    padding: calc(8px * var(--SCALE));
    cursor: pointer;
    transition: box-shadow var(--TRANSITION), transform var(--TRANSITION);
}
.ac-card:hover {
    box-shadow: var(--SHADOW-2);
    transform: translateY(-1px);
}

.ac-thumb {
    flex: 0 0 auto;
    width: calc(88px * var(--SCALE));
    height: calc(60px * var(--SCALE));
    border-radius: var(--RADIUS-SM);
    overflow: hidden;
    background: var(--ACCENT-SOFT);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ac-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ac-thumb-ph {
    font-size: calc(24px * var(--SCALE));
    color: var(--ACCENT);
    opacity: 0.7;
}

.ac-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: calc(2px * var(--SCALE));
}
.ac-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: calc(8px * var(--SCALE));
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-row-title { align-items: baseline; }
.ac-flag {
    flex: 0 0 auto;
    width: calc(18px * var(--SCALE));
    height: calc(12px * var(--SCALE));
    align-self: center;
    margin-right: calc(6px * var(--SCALE));
    border-radius: 1px;
    box-shadow: 0 0 0 1px var(--BORDER-COLOR);
    object-fit: cover;
}
.ac-callsign {
    font-weight: 600;
    font-size: var(--FS3);
    color: var(--TXTCOLOR1);
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-reg {
    font-size: var(--FS2);
    color: var(--TXTCOLOR3);
    flex: 0 0 auto;
}
.ac-route {
    font-size: var(--FS2);
    color: var(--TXTCOLOR2);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    min-height: calc(var(--FS2));
}
.ac-meta {
    font-size: var(--FS1);
    color: var(--TXTCOLOR3);
}
.ac-type { font-weight: 500; }
.ac-alt { font-variant-numeric: tabular-nums; }
.ac-owner {
    font-size: var(--FS1);
    color: var(--TXTCOLOR3);
    opacity: 0.85;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Telemetry stat chips: speed / distance / track / rssi */
.ac-stats {
    display: flex;
    flex-wrap: wrap;
    gap: calc(4px * var(--SCALE)) calc(10px * var(--SCALE));
    margin-top: calc(2px * var(--SCALE));
}
.ac-stat {
    display: inline-flex;
    align-items: baseline;
    gap: calc(3px * var(--SCALE));
    font-size: var(--FS1);
    white-space: nowrap;
}
.ac-stat-l {
    color: var(--TXTCOLOR3);
    opacity: 0.7;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.ac-stat-v {
    color: var(--TXTCOLOR2);
    font-variant-numeric: tabular-nums;
}
/* Subtle marker that a thumbnail is a stock (type) image, not the real airframe. */
.ac-thumb-stock { position: relative; }
.ac-thumb-stock::after {
    content: 'stock';
    position: absolute;
    right: 2px;
    bottom: 2px;
    font-size: calc(8px * var(--SCALE));
    line-height: 1;
    padding: 1px 3px;
    border-radius: 2px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    letter-spacing: 0.03em;
}

/* Phones: full-width cards, slightly larger touch target */
@media screen and (max-width: 600px) {
    .ac-thumb {
        width: calc(76px * var(--SCALE));
        height: calc(54px * var(--SCALE));
    }
    .ac-card { padding: calc(10px * var(--SCALE)); }
}

/* Toggle bar + button that switches between table and card view. */
#ac_view_toggle_bar {
    padding: calc(8px * var(--SCALE));
    display: flex;
    justify-content: flex-end;
}
.ac-panel-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: calc(6px * var(--SCALE));
    cursor: pointer;
    user-select: none;
    font-size: var(--FS2);
    font-weight: 600;
    color: var(--ACCENT-CONTRAST);
    background: var(--ACCENT);
    border: 1px solid var(--ACCENT-STRONG);
    border-radius: var(--RADIUS-SM);
    padding: calc(5px * var(--SCALE)) calc(12px * var(--SCALE));
    box-shadow: var(--SHADOW-1);
    transition: background-color var(--TRANSITION);
    line-height: 1.4;
}
.ac-panel-toggle-btn:hover { background: var(--ACCENT-STRONG); }
.ac-panel-toggle-btn.activeButton { background: var(--ACCENT-STRONG); }
