/* Planeplotter visual layer. Upstream layout, map and data logic stay intact. */
:root {
  --BGCOLOR1: #1b264f !important;
  --BGCOLOR2: #302b27 !important;
  --ACCENT: #274690 !important;
  --TXTCOLOR1: #f5f3f5 !important;
  --TXTCOLOR2: #f5f3f5 !important;
  --TXTCOLOR3: #c4cce4 !important;
  --pp-line: #576ca8;
}
html, body, .ui-widget { font-family: Inter, "Segoe UI", system-ui, sans-serif; }
body { -webkit-font-smoothing: antialiased; }
#sidebar_container { background: var(--BGCOLOR1); box-shadow: -8px 0 28px #1b264f20; }
#sidebar_canvas { padding: 12px; }
.pp-brand { display:flex; align-items:center; gap:10px; padding:6px 2px 16px; border-bottom:1px solid var(--pp-line); margin-bottom:12px; }
.pp-mark { display:grid; place-items:center; width:38px; height:38px; border-radius:12px; background:#1b264f; color:#f5f3f5; font-size:24px; }
.pp-brand strong { display:block; color:#f5f3f5; font-size:19px; letter-spacing:-.6px; }
.pp-brand small { display:block; color:#c4cce4; font-size:10px; letter-spacing:1.7px; text-transform:uppercase; margin-top:3px; }
.pp-brand a { margin-left:auto; color:#f5f3f5; font-size:11px; text-decoration:none; padding:8px; border:1px solid var(--pp-line); border-radius:7px; }
#sidebar-table > table { border:1px solid var(--pp-line); border-radius:10px; background:#1b264f; padding:8px; margin-bottom:12px; }
#dump1090_total_ac, #dump1090_total_ac_positions, #dump1090_message_rate { font-weight:700; font-variant-numeric:tabular-nums; }
.infoBlockTitleText { color:#c4cce4; }
#tabs.ui-widget-content { border:1px solid var(--pp-line); border-radius:10px; background:#1b264f; margin-bottom:12px; overflow:hidden; }
#tabs .ui-tabs-nav { background:#302b27; border:0; padding:5px; }
#tabs .ui-tabs-nav li { border:0; border-radius:7px; background:transparent; margin:0 3px 0 0; }
#tabs .ui-tabs-nav li a { padding:9px 13px; font-weight:600; color:#c4cce4; }
#tabs .ui-tabs-nav li.ui-tabs-active { background:#1b264f; box-shadow:0 1px 4px #1b264f18; }
#tabs .ui-tabs-nav li.ui-tabs-active a { color:#f5f3f5; }
#tabs .ui-tabs-panel { padding:12px 8px; }
.searchInput, .altitudeFilterInput, select { border:1px solid #576ca8; border-radius:6px; padding:5px 6px; height:auto; background:#1b264f; color:#f5f3f5; box-sizing:content-box; }
.searchInput { max-width:100%; }
.formButton, .greyButton { border:1px solid #576ca8; border-radius:6px; padding:6px 9px; background:#302b27; color:#f5f3f5; cursor:pointer; margin:2px 0; }
.formButton:hover, .greyButton:hover { background:#274690; border-color:#c4cce4; }
button:disabled { opacity:.5; cursor:default; }
:is(button, input, select, a, [role=button]):focus-visible { outline:3px solid #f5f3f5; outline-offset:2px; }
#planesTable { border-spacing:0; font-variant-numeric:tabular-nums; }
#planesTable .aircraft_table_header { background:#1b264f; box-shadow:none; }
#planesTable .aircraft_table_header td { padding:10px 6px; font-weight:600; font-size:11px; letter-spacing:.3px; }
#planesTable tbody tr td { padding:7px 6px; border-bottom:1px solid #576ca855; }

#planesTable .icaoCodeColumn { font-size:12px; }
.button, .svgButton { border-radius:7px; box-shadow:0 2px 6px #1b264f30; }
.button.inActiveButton { background:#1b264f !important; color:white !important; }
.button.activeButton { background:#274690 !important; color:#f5f3f5 !important; box-shadow:inset 0 0 0 2px #576ca8; }
.button:hover { outline:2px solid #576ca8; outline-offset:1px; }
.sidebar_button { border-radius:7px; }
.ol-control { border-radius:8px; padding:3px; }
.ol-control button { border-radius:6px; background-color:#f5f3f5; }
.ol-control button:hover, .ol-control button:focus { background-color:#f5f3f5; }
.layer-switcher .panel { border-radius:12px; box-shadow:0 8px 30px #1b264f30; padding:14px; }
#selected_infoblock { border-right:1px solid var(--pp-line); box-shadow:5px 0 24px #1b264f20; }
#highlighted_infoblock { border:1px solid var(--pp-line); border-radius:10px; box-shadow:0 8px 30px #1b264f30; padding:8px; }
.highlightedTitle { border-color:var(--pp-line); padding-bottom:8px; }
.identLarge { font-weight:650; letter-spacing:-.5px; }
.ui-dialog { border-radius:12px; box-shadow:0 12px 45px #1b264f30; }
.ui-dialog .ui-dialog-titlebar { border:0; background:#302b27; border-radius:9px; padding:10px; }
@media (max-width:600px) {
  #sidebar_canvas { padding:8px; }
  .pp-brand { padding-bottom:10px; margin-bottom:8px; }
  .pp-brand strong { font-size:17px; }
  .pp-brand small { font-size:9px; }
  #planesTable tbody tr td { padding:8px 5px; }
  .formButton, .greyButton { min-height:32px; }
}

/* Dark chrome; native tar1090 row backgrounds are never overridden. */
:root { color-scheme: dark; }
#sidebar_canvas, #sidebar-table, #tabs, #selected_infoblock, #highlighted_infoblock { color: #f5f3f5; }
.pp-mark, #tabs .ui-tabs-nav li.ui-tabs-active { background: #274690; }
.pp-brand a:hover { background: #274690; }
#planesTable { color: #f5f3f5; background: #1b264f; }
#planesTable thead { color: #f5f3f5; }
#planesTable tbody tr td { line-height: 1.45; }

#planesTable tbody tr td:first-child { border-left: 3px solid transparent; }
#planesTable tbody tr:hover td:first-child { border-left-color: #f5f3f5; }
#sidebar-table a, .link, .link a { color: #d7def2; }
input::placeholder { color: #c4cce4; opacity: 1; }
.ui-widget-content, .ui-widget-header, .ui-dialog .ui-dialog-titlebar, .layer-switcher .panel { color:#f5f3f5; background-color:#1b264f; border-color:#576ca8; }
.ui-widget-content a { color:#d7def2; }
.infoblockCloseBox, .settingsCloseBox { filter:invert(1) !important; }
#settings, #settingsLeft, #settingsRight { color: #f5f3f5; }

/* Move existing live status nodes; keep their IDs and native update behavior. */
body.pp-has-status { --pp-status-height: 52px; }
.pp-has-status #layout_container { height:calc(100% - var(--pp-status-height)); position:relative; }
#pp-status { position:fixed; inset:auto 0 0; height:var(--pp-status-height); box-sizing:border-box; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:6px 18px; background:#302b27; color:#f5f3f5; border-top:1px solid #576ca8; z-index:100; font-size:12px; }
#pp-status table { width:auto !important; border-collapse:collapse; }
#pp-status td { padding:2px 12px 2px 0; white-space:nowrap; }
#pp-status .infoBlockTitleText { color:#c4cce4; }
#pp-status a, #pp-status .link, #pp-status .link a { color:#f5f3f5; }
#pp-status .pp-status-version { font-size:11px; }
.pp-has-status #sidebar-table > table { padding:0; border:0; margin:0; background:transparent; }
.pp-has-status #sidebar-table > table > tbody > .rSpacer { display:none; }
@media(max-width:700px) {
  body.pp-has-status { --pp-status-height:84px; }
  #pp-status { flex-direction:column; align-items:flex-start; justify-content:center; gap:4px; padding:6px 10px; font-size:11px; }
  #pp-status td { padding-right:10px; }
  #pp-status .pp-status-version { font-size:10px; }
}

/* Compact single-line status strip; scroll horizontally on small screens. */
body.pp-has-status { --pp-status-height:38px; }
#pp-status { flex-direction:row; align-items:center; justify-content:flex-start; gap:24px; padding:0 14px; overflow-x:auto; overflow-y:hidden; white-space:nowrap; scrollbar-width:thin; font-size:12px; }
#pp-status table { display:flex; align-items:center; flex:0 0 auto; gap:22px; }
#pp-status tbody, #pp-status tr { display:contents; }
#pp-status td { width:auto !important; padding:0; }
#pp-status .pp-status-version { margin-left:auto; font-size:11px; }
@media(max-width:700px) {
  #pp-status { gap:18px; padding:0 10px; font-size:11px; }
  #pp-status table { gap:16px; }
}

/* Center the status group as a whole; auto margins collapse when it overflows. */
#pp-status .pp-status-metrics { margin-left:auto; }
#pp-status .pp-status-version { margin-left:0; margin-right:auto; }
#header_side .pp-icon-button, #header_top .pp-icon-button { position:relative; vertical-align:middle; }
.pp-icon-button .buttonText { display:flex; align-items:center; justify-content:center; width:100%; height:100%; margin:0; line-height:1; }
.pp-icon-button svg { width:19px; height:19px; pointer-events:none; }
.pp-icon-button:focus-visible { outline:2px solid #f5f3f5; outline-offset:2px; }
#pp-control-tooltip { position:fixed; z-index:10000; padding:8px 11px; max-width:240px; border:1px solid #576ca8; border-radius:7px; background:#1b264f; color:#f5f3f5; font-size:12px; line-height:1.4; box-shadow:0 4px 16px #0006; pointer-events:none; }

button.pp-icon-button { border:0; padding:0; font:inherit; }
