/* Base Map and Layout Styles */
#ol-map {
  border-radius: 0px;
  box-sizing: border-box; 
  width: 100%; 
  height: 100%;
  max-width: none;
  min-height: 734px;
}

#upload-controls-overlay {
  /* Simplified - only contains recall-url-container now */
  background: rgba(255, 255, 255, 0.95);
  margin-top: 15px;
}

.upload-status-panel {
  display: none;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: linear-gradient(140deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
  color: #1f2937;
}

.upload-status-panel.is-visible {
  display: flex;
}

.upload-status-panel.is-complete .status-title {
  color: #0f766e;
}

.upload-status-panel.is-error .status-title {
  color: #dc2626;
}

.status-progress {
  position: relative;
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
}

.status-progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.status-progress-ring__bg {
  fill: none;
  stroke: rgba(148, 163, 184, 0.2);
  stroke-width: 10;
}

.status-progress-ring__value {
  --progress: 0;
  fill: none;
  stroke: #2563eb;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: calc(339.292 - (var(--progress, 0) / 100) * 339.292);
  transition: stroke-dashoffset 0.35s ease, stroke 0.35s ease;
}

.upload-status-panel.is-complete .status-progress-ring__value {
  stroke: #0f766e;
}

.upload-status-panel.is-error .status-progress-ring__value {
  stroke: #dc2626;
}

.status-progress-label {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  font-size: 1.1em;
  font-weight: 600;
  color: #1f2937;
}

.status-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1d4ed8;
}

.status-subtitle {
  font-size: 0.85rem;
  color: #4b5563;
}

.status-steps {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.status-step-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #d1d5db;
  color: #1f2937;
  font-size: 0.9em;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.status-step--running .status-step-icon {
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 0 0 0 rgba(29, 78, 216, 0.25);
  animation: status-step-pulse 1.8s ease infinite;
}

.status-step--completed .status-step-icon {
  background: #0f766e;
  color: #ffffff;
  box-shadow: none;
}

.status-step--error .status-step-icon {
  background: #dc2626;
  color: #ffffff;
}

.status-step-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-step-name {
  font-weight: 600;
  color: #111827;
}

.status-step-message {
  font-size: 0.83rem;
  color: #4b5563;
  white-space: pre-line;
  word-break: break-word;
}

@keyframes status-step-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(29, 78, 216, 0.25);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(29, 78, 216, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(29, 78, 216, 0);
  }
}

@media (max-width: 768px) {
  .upload-status-panel {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .status-progress {
    margin-bottom: 8px;
  }

  .status-step {
    flex-direction: column;
    align-items: center;
  }

  .status-step-body {
    align-items: center;
  }
}

.xc-flightcheck-layout {
  --left-panel-width: 360px;
  --left-toggle-width: 15px;
  --right-panel-width: 320px;
  --right-toggle-width: 15px;
  display: grid;
  grid-template-columns: var(--left-panel-width) var(--left-toggle-width) minmax(0, 1fr);
  width: 100%;
  gap: 0;
  min-height: calc(100vh - 140px);
  position: relative;
}

.xc-flightcheck-layout.left-wide {
  --left-panel-width: 720px;
}

.left-panel {
  display: flex;
  min-height: 100%;
  background: #34495e;
  position: relative;
  grid-column: 1;
}

#left-panel-toggle {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 15px;
  border: none;
  background: #167aad;
  color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, width 0.2s ease;
  z-index: 25;
  box-shadow: none;
  align-self: stretch;
  grid-column: 2;
}

@media (max-width: 994px) {
  #left-panel-toggle {
    display: none;
  }
  .xc-flightcheck-layout {
    --left-toggle-width: 0px;
  }
}

#left-panel-toggle i {
  transition: transform 0.2s ease;
  font-size: 0.75rem;
}

#left-panel-toggle:hover {
  background: #9cc61f;
}

.xc-flightcheck-layout.is-left-collapsed {
  --left-panel-width: 0px;
  --left-toggle-width: 0px;
  grid-template-columns: 0 var(--left-toggle-width) minmax(0, 1fr);
}

.xc-flightcheck-layout.is-left-collapsed .left-wrapper {
  display: none;
}

.xc-flightcheck-layout.is-left-collapsed .left-panel {
  display: none;
}

.xc-flightcheck-layout.is-left-collapsed .center-panel {
  grid-column: 1 / -1;
}

.xc-flightcheck-layout.is-left-collapsed .map-wrapper {
  --analyzer-map-control-left: 66px;
  --analyzer-info-box-left: 176px;
}

.xc-flightcheck-layout.is-left-collapsed #left-panel-toggle {
  position: absolute;
  top: 0px;
  bottom: auto;
  left: 0px;
  width: 55px;
  height: 55px;
  /* border-radius: 50%; */
  background: #aedb34;
  color: #252525;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  align-self: auto;
  z-index: 7200;
}

.xc-flightcheck-layout.is-left-collapsed .map-wrapper > .ol-map-view-switch,
.xc-flightcheck-layout.is-left-collapsed .map-wrapper > .analyzer-map-controls {
  left: var(--analyzer-map-control-left, 66px);
}

.xc-flightcheck-layout.is-left-collapsed #left-panel-toggle:hover {
  background: #81a322;
  color: #252525;
}

.xc-flightcheck-layout.is-left-collapsed #left-panel-toggle i {
  transform: rotate(180deg);
}

.left-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 0;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
}

.left-wrapper > #upload-controls-overlay {
  margin-left: 16px;
  margin-right: 16px;
}

.left-wrapper > .left-tabs {
  margin-left: 16px;
  margin-right: 16px;
}

.left-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: 8px;
  margin-top: 8px;
}

.left-tab-button {
  flex: 1 1 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 10px;
  font-size: 0.85em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.left-tab-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.left-tab-button.is-active {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-weight: 600;
}

.left-tab-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

.tab-section {
  display: none;
  flex: 1 1 auto;
  /* width: 100%; */
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}

.tab-section.is-active {
  display: block;
}

.center-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  grid-column: 3;
  grid-row: 1;
}

.analysis-layout {
  display: grid;
  grid-template-columns: 1fr var(--right-toggle-width) var(--right-panel-width);
  grid-template-rows: auto auto;
  grid-template-areas:
    "map-column right-toggle right-panel"
    "chart-panel chart-panel chart-panel";
  min-height: calc(100vh - 140px);
  gap: 0;
  position: relative;
}

.map-column {
  grid-area: map-column;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.right-panel-toggle {
  grid-area: right-toggle;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #1f7aa8;
  color: #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s ease, width 0.2s ease;
  width: 100%;
  min-width: var(--right-toggle-width);
  height: 100%;
  box-shadow: none;
}

.right-panel-toggle:hover {
  background: #4faad4;
}

.right-panel-toggle i {
  transition: transform 0.2s ease;
  font-size: 0.75rem;
}

.right-panel {
  grid-area: right-panel;
  display: flex;
  flex-direction: column;
  background: #f7f9fc;
  border-left: 1px solid rgba(15, 23, 42, 0.12);
  /* min-height: calc(100vh - 140px); */
  min-width: 0;
  overflow: hidden;
}

.right-wrapper {
  display: flex;
  background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
  flex-direction: column;
  gap: 16px;
  /* padding: 18px 16px; */
  min-height: 100%;
  overflow-y: auto;
}

.chart-panel {
  grid-area: chart-panel;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
}

.xc-flightcheck-layout.is-right-collapsed .analysis-layout {
  grid-template-columns: 1fr 0 0;
}

.xc-flightcheck-layout.is-right-collapsed .right-panel {
  display: none;
}

.xc-flightcheck-layout.is-right-collapsed .right-panel-toggle {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 55px;
  height: 55px;
  /* border-radius: 50%; */
  background: #4faad4;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.xc-flightcheck-layout.is-right-collapsed .right-panel-toggle:hover {
  background: #3b8fb6;
  color: #0f172a;
}

.xc-flightcheck-layout.is-right-collapsed .right-panel-toggle i {
  transform: rotate(180deg);
}

body.has-analyzer-fullscreen {
  overflow: hidden;
}

body.has-analyzer-fullscreen .tra-aktivierung-reiter {
  display: none;
}

.xc-flightcheck-layout.is-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  padding: 0;
  background: #01070f;
  z-index: 2000;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.xc-flightcheck-layout.is-fullscreen .left-panel,
.xc-flightcheck-layout.is-fullscreen #left-panel-toggle,
.xc-flightcheck-layout.is-fullscreen .right-panel,
.xc-flightcheck-layout.is-fullscreen .right-panel-toggle {
  display: none !important;
}

.xc-flightcheck-layout.is-fullscreen .center-panel {
  grid-column: 1;
  grid-row: 1;
  min-height: 100%;
}

.xc-flightcheck-layout.is-fullscreen .analysis-layout {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "map-column"
    "chart-panel";
  grid-template-rows: minmax(420px, 62dvh) auto;
  min-height: 100dvh;
  height: auto;
}

.xc-flightcheck-layout.is-fullscreen .chart-panel {
  padding: 0;
  height: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  overflow: visible;
}

.xc-flightcheck-layout.is-fullscreen .chart-table-container {
  position: relative;
  display: block;
  min-height: 0;
}

.xc-flightcheck-layout.is-fullscreen .chart-panel .chart-table-container > .altitude-chart-wrapper {
  display: flex !important;
}

.xc-flightcheck-layout.is-fullscreen #violation-table-container,
.xc-flightcheck-layout.is-fullscreen #meteo-debug-panel,
.xc-flightcheck-layout.is-fullscreen #airspace-fl-debug-panel {
  display: none !important;
}

.xc-flightcheck-layout.is-fullscreen .altitude-chart-toggles {
  flex-shrink: 0;
}

.xc-flightcheck-layout.is-fullscreen .altitude-chart-wrapper {
  display: flex;
  gap: 12px;
  align-items: stretch;
  min-height: 260px;
  flex: none;
}

.xc-flightcheck-layout.is-fullscreen #altitude-chart-container {
  flex: 1;
  min-height: 260px;
  height: clamp(260px, 32dvh, 430px) !important;
  max-height: none;
  overflow: hidden;
}

.xc-flightcheck-layout.is-fullscreen #altitude-chart {
  height: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
}

.xc-flightcheck-layout.is-fullscreen .map-column,
.xc-flightcheck-layout.is-fullscreen .map-wrapper {
  min-height: 0;
}

.xc-flightcheck-layout.is-fullscreen .map-column {
  background: #f5f5f5;
}

.xc-flightcheck-layout.is-fullscreen .map-wrapper {
  --analyzer-map-control-left: 14px;
  --analyzer-info-box-left: 124px;
  flex: 1 1 auto;
  height: 100%;
  background: #f5f5f5;
}

.xc-flightcheck-layout.is-fullscreen #ol-map,
.xc-flightcheck-layout.is-fullscreen .ol-map {
  min-height: 0;
  height: 100%;
}

@media (max-width: 992px) {
  .xc-flightcheck-layout {
    grid-template-columns: 1fr;
  }

  .xc-flightcheck-layout.left-wide {
    --left-panel-width: 100%;
  }

  .left-panel {
    min-height: auto;
    grid-column: auto;
  }

  .center-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .analysis-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "right-panel"
      "map-column"
      "chart-panel";
    min-height: auto;
  }

  .right-panel-toggle {
    display: none;
  }

  .right-panel {
    border-left: none;
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    min-height: auto;
  }

  .xc-flightcheck-layout.is-right-collapsed .right-panel {
    display: flex;
  }
}

@media (max-width: 1200px) {
  .xc-flightcheck-layout {
    --right-panel-width: 300px;
  }
}

@media (min-width: 1440px) {
  .xc-flightcheck-layout.left-wide {
    --right-panel-width: 360px;
  }
}

.xc-flightcheck-layout {
  --right-panel-width: 0px;
  --right-toggle-width: 0px;
}

.analysis-layout,
.xc-flightcheck-layout.is-right-collapsed .analysis-layout,
.xc-flightcheck-layout.is-fullscreen .analysis-layout,
.xc-flightcheck-layout.is-fullscreen.is-right-collapsed .analysis-layout {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "map-column"
    "chart-panel";
}

.right-panel,
.right-panel-toggle {
  display: none !important;
}

.tra-aktivierung-reiter {
    background: #34495e;
    color: white;
    font-weight: bold;
    margin-bottom: 0;
}

#track-info, #violation-summary {
    overflow-y: auto;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    max-width: 360px;
}

/* Button styling for direct placement above enhanced-track-info */
#clear-tracks-btn {
  width: calc(100% - 32px) !important;
  margin: 0 16px !important;
  min-height: 44px !important;
  padding: 12px 8px !important;
  border-radius: 0 !important;
  border: none !important;
  background: #aedb34  !important;
  color: #3c3434 !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#clear-tracks-btn:hover {
  background: #9ac52d !important;
}

#clear-tracks-btn:active {
  background: #21618c !important;
}

/* General UI Elements */
button:hover {
    opacity: 0.9;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.col {
  flex: 1 1 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-wrapper,
.chart-and-table {
  position: relative;
  max-width: none;
  max-height: none;
}

.map-wrapper {
  --analyzer-map-control-left: 14px;
  --analyzer-info-box-left: 124px;
  --analyzer-info-box-edge-gap: 24px;
  display: flex;
  width: 100%;
  flex: 1 1 auto;
  min-height: 70vh;
  background: #f5f5f5;
  min-width: 0;
}

.map-touch-toggle {
  position: fixed;
  top: -9999px;
  left: -9999px;
  z-index: 4000;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: rgba(33, 37, 41, 0.85);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  visibility: hidden;
}

.map-touch-toggle:focus-visible {
  outline: 2px solid #66afe9;
  outline-offset: 2px;
}

.map-touch-toggle:hover {
  background: rgba(33, 37, 41, 0.9);
}

.map-touch-toggle__icon {
  display: inline-flex;
  font-size: 0.95rem;
}

.map-wrapper.map-scroll-mode .map-touch-toggle {
  background: rgba(13, 110, 253, 0.9);
}

.map-wrapper.map-scroll-mode .map-touch-toggle:hover {
  background: rgba(13, 110, 253, 1);
}

.map-wrapper.map-scroll-mode #ol-map {
  pointer-events: none;
}

.map-wrapper.map-scroll-mode #ol-map .ol-viewport {
  touch-action: auto !important;
}

.map-wrapper.map-scroll-mode .ol-map-3d {
  pointer-events: none;
}

.ol-map-view-switch {
  position: absolute;
  top: 14px;
  right: auto;
  left: var(--analyzer-map-control-left, 14px);
  z-index: 6500;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(8px);
}

.ol-map-view-switch__button {
  min-width: 42px;
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.ol-map-view-switch__button.is-active,
.ol-map-view-switch__button[aria-pressed="true"] {
  background: #ffffff;
  color: #0f172a;
}

.analyzer-map-controls {
  position: absolute;
  top: 14px;
  left: var(--analyzer-map-control-left, 14px);
  z-index: 6500;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.ol-map-view-switch + .analyzer-map-controls {
  top: 62px;
}

.analyzer-map-control-menu {
  position: relative;
  pointer-events: auto;
}

.analyzer-map-control,
.analyzer-color-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.84);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(10px);
  cursor: pointer;
  pointer-events: auto;
}

.analyzer-map-control:hover:not(:disabled),
.analyzer-map-control:focus-visible,
.analyzer-color-option:hover:not(:disabled),
.analyzer-color-option:focus-visible {
  background: #0f172a;
  outline: 2px solid rgba(174, 219, 52, 0.78);
  outline-offset: 2px;
}

.analyzer-map-control.is-active,
.analyzer-map-control[aria-pressed="true"],
.analyzer-color-option.is-active,
.analyzer-color-option[aria-pressed="true"] {
  border-color: rgba(174, 219, 52, 0.9);
  background: #aedb34;
  color: #172033;
  opacity: 1;
}

.analyzer-map-control:not(.is-active):not([aria-pressed="true"]):not(:disabled),
.analyzer-color-option:not(.is-active):not([aria-pressed="true"]):not(:disabled) {
  opacity: 0.74;
}

.analyzer-map-control.is-active:hover:not(:disabled),
.analyzer-map-control.is-active:focus-visible,
.analyzer-map-control[aria-pressed="true"]:hover:not(:disabled),
.analyzer-map-control[aria-pressed="true"]:focus-visible,
.analyzer-color-option.is-active:hover:not(:disabled),
.analyzer-color-option.is-active:focus-visible,
.analyzer-color-option[aria-pressed="true"]:hover:not(:disabled),
.analyzer-color-option[aria-pressed="true"]:focus-visible {
  border-color: rgba(174, 219, 52, 0.9);
  background: #aedb34;
  color: #172033;
  outline: 2px solid rgba(174, 219, 52, 0.78);
  outline-offset: 2px;
  opacity: 1;
}

.analyzer-map-control:disabled,
.analyzer-color-option:disabled,
.analyzer-menu-option:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.analyzer-map-control:hover:not(:disabled),
.analyzer-map-control:focus-visible,
.analyzer-color-option:hover:not(:disabled),
.analyzer-color-option:focus-visible,
.analyzer-menu-option:hover:not(:disabled),
.analyzer-menu-option:focus-visible {
  opacity: 1;
}

.analyzer-map-control--color,
.analyzer-color-option {
  font-weight: 800;
  line-height: 1;
}

.analyzer-color-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  color: inherit;
  font-size: 0.62rem;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.analyzer-map-control--color .analyzer-color-label {
  font-size: 0.64rem;
}

.analyzer-map-control[hidden],
.analyzer-color-option[hidden],
[data-analyzer-airspace-dependent][hidden] {
  display: none !important;
}

.analyzer-map-menu {
  position: absolute;
  top: 0;
  left: 44px;
  display: grid;
  gap: 5px;
  min-width: 224px;
  max-width: min(320px, calc(100vw - 78px));
  max-height: min(430px, 72dvh);
  padding: 7px;
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.97);
  color: #0f172a;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(12px);
}

.analyzer-map-menu[hidden],
.analyzer-color-menu[hidden] {
  display: none !important;
}

.analyzer-menu-title {
  padding: 3px 4px 1px;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 840;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.analyzer-menu-option {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 34px;
  width: 100%;
  padding: 5px 8px 5px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  font-size: 0.76rem;
  font-weight: 760;
  line-height: 1.16;
  text-align: left;
  cursor: pointer;
}

.analyzer-menu-option i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
  font-size: 0.78rem;
}

.analyzer-menu-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analyzer-map-menu--basemap .analyzer-menu-option {
  display: flex;
  grid-template-columns: none;
  padding-left: 10px;
}

.analyzer-map-menu--basemap .analyzer-menu-option i {
  display: none;
}

.analyzer-menu-option:hover:not(:disabled),
.analyzer-menu-option:focus-visible {
  border-color: rgba(29, 135, 248, 0.22);
  background: rgba(29, 135, 248, 0.1);
  outline: none;
}

.analyzer-menu-option.is-active,
.analyzer-menu-option[aria-pressed="true"] {
  border-color: rgba(174, 219, 52, 0.54);
  background: rgba(174, 219, 52, 0.2);
  color: #172033;
  opacity: 1;
}

.analyzer-menu-option:not(.is-active):not([aria-pressed="true"]):not(:disabled) {
  opacity: 0.78;
}

.analyzer-menu-option.is-active i,
.analyzer-menu-option[aria-pressed="true"] i {
  background: #aedb34;
  color: #172033;
}

.analyzer-color-menu {
  position: absolute;
  top: 0;
  left: 44px;
  display: grid;
  grid-template-columns: repeat(4, 30px);
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.96);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(12px);
}

.analyzer-color-option {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  box-shadow: none;
}

.analyzer-altitude-values {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px 4px;
  color: #0f172a;
  font-size: 0.74rem;
  font-weight: 760;
}

.analyzer-altitude-slider {
  display: grid;
  gap: 4px;
  padding: 5px 6px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
  color: #334155;
  font-size: 0.72rem;
  font-weight: 760;
}

.analyzer-altitude-slider input[type="range"] {
  width: 100%;
}

.analyzer-map-menu--legend {
  width: min(300px, calc(100vw - 78px));
}

.analyzer-map-menu--legend .color-legend-title {
  margin-bottom: 5px;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 840;
  text-transform: uppercase;
}

.analyzer-map-menu--legend .legend-item,
.analyzer-map-menu--legend .legend-heading,
.analyzer-map-menu--legend .legend-subheading {
  color: #0f172a;
}

body.dark-mode .analyzer-map-menu,
body.dark-mode .analyzer-color-menu {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
}

body.dark-mode .analyzer-menu-title,
body.dark-mode .analyzer-map-menu--legend .color-legend-title {
  color: #cbd5e1;
}

body.dark-mode .analyzer-menu-option,
body.dark-mode .analyzer-altitude-values,
body.dark-mode .analyzer-altitude-slider,
body.dark-mode .analyzer-map-menu--legend .legend-item,
body.dark-mode .analyzer-map-menu--legend .legend-heading,
body.dark-mode .analyzer-map-menu--legend .legend-subheading {
  color: #e2e8f0;
}

body.dark-mode .analyzer-menu-option i,
body.dark-mode .analyzer-altitude-slider {
  background: rgba(148, 163, 184, 0.16);
}

body.dark-mode .analyzer-menu-option:hover:not(:disabled),
body.dark-mode .analyzer-menu-option:focus-visible {
  border-color: rgba(174, 219, 52, 0.35);
  background: rgba(148, 163, 184, 0.14);
}

.ol-map-3d {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  contain: layout size paint;
  background: #0f172a;
}

.ol-map-3d[hidden] {
  display: none !important;
}

.ol-map-3d .cesium-viewer,
.ol-map-3d .cesium-viewer-cesiumWidgetContainer,
.ol-map-3d .cesium-widget,
.ol-map-3d .cesium-widget canvas {
  width: 100%;
  min-height: 0;
  height: 100%;
  display: block;
}

.ol-map-3d .cesium-viewer-bottom,
.ol-map-3d .cesium-credit-logoContainer {
  display: none !important;
}

.ol-map-3d .cesium-widget-credits {
  right: 0.65rem;
  bottom: 0.5rem;
  font-size: 0.68rem;
  opacity: 0.72;
}

.ol-map-3d-status {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6600;
  transform: translate(-50%, -50%);
  max-width: min(320px, calc(100% - 32px));
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.28);
}

.ol-map-3d-status.is-error {
  background: rgba(127, 29, 29, 0.92);
}

.map-wrapper.is-3d-mode #ol-info-box,
.map-wrapper.is-3d-mode #ol-feature-boxes-overlay {
  display: none !important;
}

@media (max-width: 768px) {
  .map-wrapper,
  .xc-flightcheck-layout.is-left-collapsed .map-wrapper {
    --analyzer-map-control-left: 8px;
    --analyzer-info-box-left: 108px;
    --analyzer-info-box-edge-gap: 16px;
  }

  .ol-map-view-switch {
    top: 10px;
    right: auto;
    left: var(--analyzer-map-control-left, 8px);
    padding: 3px;
  }

  .ol-map-view-switch__button {
    min-width: 38px;
    padding: 7px 9px;
    font-size: 0.74rem;
  }

  .analyzer-map-controls {
    top: 8px;
    left: var(--analyzer-map-control-left, 8px);
    gap: 5px;
  }

  .ol-map-view-switch + .analyzer-map-controls {
    top: 48px;
  }

  .analyzer-map-control {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
  }

  .analyzer-map-menu {
    left: 40px;
    min-width: 208px;
    max-width: calc(100vw - 64px);
    max-height: min(360px, 64dvh);
    padding: 6px;
  }

  .analyzer-color-menu {
    left: 40px;
    grid-template-columns: repeat(4, 28px);
    gap: 4px;
    padding: 5px;
  }

  .analyzer-color-option {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
  }

  .analyzer-color-label {
    font-size: 0.54rem;
  }

  .analyzer-map-control--color .analyzer-color-label {
    font-size: 0.58rem;
  }

  .analyzer-menu-option {
    min-height: 32px;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 7px;
    padding: 4px 7px 4px 5px;
    font-size: 0.72rem;
  }

  .analyzer-menu-option i {
    width: 24px;
    height: 24px;
    font-size: 0.74rem;
  }

  .ol-map-3d {
    width: 100%;
    height: 500px;
    min-height: 500px;
  }
}

/* Common Text Styles */
.section-title {
  font-weight: 700;
  margin-bottom: 8px;
  color: #111;
}

.section-title-danger {
  color: #e74c3c;
  margin-bottom: 10px;
  font-weight: 700;
}

.panel-title {
  font-weight: 700;
  margin-bottom: 4px;
  color: #0c5460;
}

.panel-body-small {
  font-size: 0.8em;
  color: #0c5460;
}

.muted {
  font-size: 0.9em;
  color: #666;
}

.muted-italic {
  color: #999;
  font-style: italic;
}

.text-right { text-align: right; }
.hidden { display: none !important; }

/* Form Elements */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.checkbox-row[hidden],
.glide-overlay-flight-list[hidden],
[hidden].checkbox-row {
  display: none !important;
}

.checkbox-row.is-disabled {
  opacity: 0.55;
}

.checkbox-row--nested {
  margin-left: 28px;
}

.display-settings-layer-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.2);
}

.display-settings-layer-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1;
}

.display-settings-layer-title i {
  width: 1em;
  text-align: center;
  color: #93c5fd;
}

.tra-admin-switch {
  --switch-off: #64748b;
  --switch-on: #22c55e;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.6rem;
  cursor: pointer;
  user-select: none;
  color: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  vertical-align: middle;
}

.tra-admin-switch__input {
  position: absolute !important;
  display: block !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
}

.tra-admin-switch__track {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  border-radius: 999px;
  background: var(--switch-off);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.16);
  transition: background 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.tra-admin-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.28);
  transition: transform 0.18s ease;
}

.tra-admin-switch__input:checked + .tra-admin-switch__track {
  background: var(--switch-on);
}

.tra-admin-switch__input:checked + .tra-admin-switch__track .tra-admin-switch__thumb {
  transform: translateX(18px);
}

.tra-admin-switch__state {
  min-width: 1.35rem;
  color: #93c5fd;
  font-size: 0.74rem;
  font-weight: 800;
}

.tra-admin-switch__state::after {
  content: attr(data-off);
}

.tra-admin-switch__input[data-switch-state="hidden"] ~ .tra-admin-switch__state {
  display: none;
}

.tra-admin-switch__input:checked ~ .tra-admin-switch__state::after {
  content: attr(data-on);
}

.tra-admin-switch__input:focus-visible + .tra-admin-switch__track {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.26), inset 0 0 0 1px rgba(15, 23, 42, 0.16);
}

.tra-admin-switch__input:disabled + .tra-admin-switch__track {
  opacity: 0.62;
}

.tra-admin-switch--compact {
  gap: 0.4rem;
}

.tra-admin-switch--compact .tra-admin-switch__track {
  width: 38px;
  height: 22px;
  flex-basis: 38px;
}

.tra-admin-switch--compact .tra-admin-switch__thumb {
  width: 16px;
  height: 16px;
}

.tra-admin-switch--compact .tra-admin-switch__input:checked + .tra-admin-switch__track .tra-admin-switch__thumb {
  transform: translateX(16px);
}

.checkbox-row .tra-admin-switch {
  width: 100%;
}

.checkbox-row--with-toggle > .tra-admin-switch {
  flex: 1 1 auto;
}

.tra-admin-switch .checkmark {
  display: none !important;
}

body.dark-mode .tra-admin-switch {
  --switch-off: #475569;
  --switch-on: #22c55e;
}

.checkbox-row .trackline-toggle--compact {
  margin-left: auto;
}

.trackline-toggle--compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.trackline-toggle--compact:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.trackline-toggle--compact.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.trackline-toggle--compact.is-disabled .switch-rail {
  pointer-events: none;
}

.trackline-toggle--compact .trackline-switch--compact .switch-rail {
  width: 100px;
  height: 26px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.trackline-toggle--compact .trackline-switch--compact .switch-option {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Notes and Panels */
.note {
  margin-top: 8px;
  margin-bottom: 15px;
  padding: 8px;
  border-radius: 4px;
  font-size: 0.85em;
}

.note-info {
  background: #e8f4fd;
  color: #0066cc;
  border: 1px solid #cfe8ff;
}

.note-warning {
  background: #fff7e6;
  color: #e67e22;
  border: 1px solid #ffe0b3;
}

.panel {
  font-size: 0.9em;
  color: #666;
  min-height: 60px;
}

.panel-light { background: #f8f9fa; }

#display-settings-content {
  background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.22);
}

#display-settings-content label,
#display-settings-content .track-coloring-options label,
#display-settings-content .setting-group h4,
#display-settings-content .checkbox-row {
  color: #ebdcdc;
}

#display-settings-content input[type="checkbox"],
#display-settings-content input[type="radio"] {
  accent-color: #2980b9 ;
  cursor: pointer;
}

#display-settings-content select {
  background: rgba(17, 29, 46, 0.65);
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.25);
}

#display-settings-content hr {
  border-top-color: rgba(255, 255, 255, 0.2) !important;
}

#display-settings-content #color-legend {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
}

.display-settings-fullscreen-btn {
  width: 100%;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(17, 29, 46, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #f9fafb;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.display-settings-fullscreen-btn:hover {
  background: rgba(17, 29, 46, 0.95);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.display-settings-fullscreen-btn.is-active {
  background: rgba(6, 132, 160, 0.95);
  border-color: rgba(255, 255, 255, 0.55);
  color: #04121c;
}

.panel-warn {
  background: #fff3cd;
  border-color: #ffeaa7;
}

.panel-info {
  background: #e8f4fd;
  border-color: #bee5eb;
}

.actions { margin-top: 12px; }

/* Buttons */
.btn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.1;
}

.btn-primary { background: #34495e; color: #fff; }
.btn-secondary { background: #95a5a6; color: #fff; }
.btn-danger { background: #e74c3c; color: #fff; }

/* Map Elements */
.ol-map {
  width: 100%;
  height: 750px;
  background: #eef1f5;
}

.ol-info-box {
  position: absolute;
  top: 0;
  left: var(--analyzer-info-box-left, 124px);
  max-width: 420px;
  padding: 12px;
  z-index: 6000;
  font-size: 0.9em;
  pointer-events: auto;
  display: none;
}

.ol-info-box .info-box-close {
  position: absolute;
  top: 3px;
  right: -13px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 28%;
  background: #e74c3c;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ol-info-box .info-box-close:hover {
  background: #dc2626;
}

.ol-info-box .airspace-selected-label {
  color: #FFD700;
  font-weight: 700;
}

.ol-info-box .track-info-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
  padding: 12px 14px 10px;
  color: #111827;
}

.ol-info-box .track-info-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.ol-info-box .track-info-pilot {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.ol-info-box .track-info-glider {
  font-size: 0.9rem;
  color: #475569;
}

.ol-info-box .track-info-point {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(15, 23, 42, 0.15);
  font-size: 0.84rem;
  color: #0f172a;
}

.ol-info-box .track-info-point small {
  color: #475569;
  display: inline-block;
  margin-left: 4px;
  font-size: 0.78rem;
}

.ol-info-box .track-media-info {
  min-width: min(360px, calc(100vw - 72px));
  padding: 0;
  overflow: hidden;
}

.ol-info-box .track-media-info__frame {
  margin-bottom: 0;
  border-radius: 0;
  overflow: hidden;
  background: #e2e8f0;
}

.ol-info-box .track-media-info__image-link {
  display: block;
  color: inherit;
  cursor: zoom-in;
}

.ol-info-box .track-media-info__frame img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

html.flight-media-lightbox-open,
html.flight-media-lightbox-open body {
  overflow: hidden;
}

.flight-media-lightbox[hidden] {
  display: none;
}

.flight-media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 6, 23, 0.88);
}

.flight-media-lightbox__inner {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.flight-media-lightbox__image {
  display: block;
  width: auto;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 96px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
}

.flight-media-lightbox__close {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.flight-media-lightbox__close:hover,
.flight-media-lightbox__close:focus-visible {
  background: rgba(15, 23, 42, 0.96);
  outline: 2px solid rgba(255, 255, 255, 0.78);
  outline-offset: 2px;
}

.flight-media-lightbox__caption {
  position: fixed;
  right: 16px;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 16px;
  max-width: min(920px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

.ol-info-box .track-media-info__meta {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.ol-info-box .track-media-info__caption {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
}

.ol-info-box .track-media-info__inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #334155;
}

.ol-info-box .track-media-info__inline-item {
  white-space: nowrap;
}

.ol-info-box .track-media-info__inline-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.ol-info-box .track-media-info__inline-link:hover {
  text-decoration: underline;
}

.ol-info-box .track-media-info__meta-row {
  font-size: 0.82rem;
  color: #334155;
}

.ol-info-box .track-media-info__meta-row strong {
  color: #0f172a;
}

.ol-info-box .track-media-info__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.ol-info-box .track-media-info__actions a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.ol-info-box .track-media-info__actions a:hover {
  text-decoration: underline;
}

.ol-info-box {
  max-width: min(440px, calc(100vw - var(--analyzer-info-box-left, 124px) - var(--analyzer-info-box-edge-gap, 24px)));
  max-height: min(68vh, 620px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(48, 58, 51, 0.96) 0%, rgba(34, 47, 50, 0.96) 100%);
  color: #f7faf7;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(8px);
}

.ol-info-box.ol-info-box--airspace-summary {
  max-width: min(410px, calc(100vw - var(--analyzer-info-box-left, 124px) - var(--analyzer-info-box-edge-gap, 24px)));
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.ol-info-box .info-box-close {
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.92rem;
}

.ol-info-box .info-box-close:hover,
.ol-info-box .info-box-close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

.ol-info-box .track-info-card,
.ol-info-box .airspace-details {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  color: #f7faf7;
}

.ol-info-box .track-info-card {
  margin-right: 28px;
}

.ol-info-box .airspace-section {
  background: transparent;
}

.ol-info-box .airspace-section.highlighted {
  margin: 2px 0;
  padding: 8px 10px;
  border: 1px solid rgba(250, 204, 21, 0.72);
  border-left: 4px solid #facc15;
  border-radius: 6px;
  background: rgba(250, 204, 21, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.ol-info-box .airspace-section.highlighted .airspace-details {
  background: transparent;
  border-color: rgba(250, 204, 21, 0.72);
}

.ol-info-box .airspace-section + .airspace-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ol-info-box .track-info-header,
.ol-info-box .airspace-details-title {
  margin-right: 28px;
}

.ol-info-box .track-info-pilot,
.ol-info-box .airspace-details-title {
  color: #ffffff;
  font-weight: 700;
}

.ol-info-box .track-info-glider,
.ol-info-box .track-info-point,
.ol-info-box .track-info-point small,
.ol-info-box .airspace-type,
.ol-info-box .airspace-icao,
.ol-info-box .altitude-limit-item {
  color: rgba(255, 255, 255, 0.78);
}

.ol-info-box .airspace-details > div:not(.airspace-details-title) {
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ol-info-box .airspace-name,
.ol-info-box .airspace-details strong,
.ol-info-box .altitude-limits {
  color: #ffffff;
}

.ol-info-box .track-info-point {
  border-top-color: rgba(255, 255, 255, 0.16);
}

.ol-info-box .track-media-info__frame {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.ol-info-box .track-media-info__caption,
.ol-info-box .track-media-info__meta-row,
.ol-info-box .track-media-info__meta-row strong,
.ol-info-box .track-media-info__inline-row {
  color: #f7faf7;
}

.ol-info-box .track-media-info__inline-link,
.ol-info-box .track-media-info__actions a {
  color: #c5f25f;
}

.ol-info-box .airspace-summary-card {
  position: relative;
  width: min(410px, calc(100vw - 48px));
  min-width: 0;
  margin: 0;
  padding: 10px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(48, 58, 51, 0.98) 0%, rgba(34, 47, 50, 0.98) 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.ol-info-box.ol-info-box--airspace-summary .info-box-close {
  top: 7px;
  right: 7px;
}

.ol-info-box .airspace-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  margin-bottom: 6px;
  padding-right: 34px;
}

.ol-info-box .airspace-summary-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

.ol-info-box .airspace-summary-table-wrap {
  overflow: visible;
  border-radius: 4px;
  background: rgba(250, 250, 248, 0.96);
}

.ol-info-box .airspace-summary-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  color: #475569;
  font-size: 0.72rem;
}

.ol-info-box .airspace-summary-table th,
.ol-info-box .airspace-summary-table td {
  padding: 5px 6px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ol-info-box .airspace-summary-table th:nth-child(2),
.ol-info-box .airspace-summary-table td:nth-child(2) {
  width: 36px;
}

.ol-info-box .airspace-summary-table th:nth-child(3),
.ol-info-box .airspace-summary-table td:nth-child(3) {
  width: 158px;
}

.ol-info-box .airspace-summary-table th {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ol-info-box .airspace-summary-table tr:last-child td {
  border-bottom: 0;
}

.ol-info-box .airspace-summary-table tr.is-selected {
  background: rgba(255, 215, 0, 0.15);
  box-shadow: inset 4px 0 0 #ffd700;
}

.ol-info-box .airspace-summary-table tr.is-selected td {
  color: #ffffff;
  background: rgba(92, 89, 42, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.ol-info-box .airspace-summary-name {
  color: #c0392b;
  font-weight: 800;
  line-height: 1.2;
}

.ol-info-box .airspace-summary-table tr.is-selected .airspace-summary-name {
  color: #ffffff;
}

.ol-info-box .airspace-summary-limits {
  display: flex;
  flex-wrap: wrap;
  gap: 1px 6px;
  margin-top: 2px;
  color: #64748b;
  font-size: 0.67rem;
  line-height: 1.15;
}

.ol-info-box .airspace-summary-table tr.is-selected .airspace-summary-limits {
  color: rgba(255, 255, 255, 0.72);
}

.ol-info-box .airspace-summary-type {
  color: #334155;
  font-weight: 700;
}

.ol-info-box .airspace-summary-table tr.is-selected .airspace-summary-type {
  color: #ffffff;
}

.ol-info-box .airspace-summary-status {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: start;
  gap: 5px;
}

.ol-info-box .airspace-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a3a3a3;
  flex: 0 0 7px;
  margin-top: 4px;
}

.ol-info-box .airspace-status-dot.is-active {
  background: #22c55e;
}

.ol-info-box .airspace-status-dot.is-inactive {
  background: #94a3b8;
}

.ol-info-box .airspace-status-pill {
  display: inline-flex;
  width: fit-content;
  padding: 1px 6px;
  border-radius: 3px;
  background: #d1d5db;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.3;
}

.ol-info-box .airspace-summary-status-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}

.ol-info-box .airspace-status-time {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: #8a8f98;
  font-size: 0.68rem;
  line-height: 1.15;
  overflow-wrap: normal;
  word-break: keep-all;
}

.ol-info-box .airspace-summary-table tr.is-selected .airspace-status-pill {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.ol-info-box .airspace-summary-table tr.is-selected .airspace-status-time {
  color: rgba(255, 255, 255, 0.82);
}

/* Color Legend */
#color-legend {
    margin-top: 8px;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.75em;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
    line-height: 1.3;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-item--note {
    margin-bottom: 4px;
    color: #555;
}

.legend-heading {
    margin-bottom: 4px;
    font-weight: 700;
}

.legend-subheading {
    margin-top: 4px;
    font-size: 0.85em;
    font-weight: 700;
}

.legend-item--nested {
    margin-left: 10px;
}

.legend-item__label--compact {
    font-size: 0.8em;
}

.legend-color-bar {
    width: 12px;
    height: 3px;
    margin-right: 6px;
    border-radius: 1px;
    flex-shrink: 0;
    background: var(--legend-color, transparent);
}

.legend-color-bar[data-legend-color] {
    background: var(--legend-color, transparent);
}

/* Display Settings Overlay */
#display-settings-overlay {
    position: absolute !important;
    top: -38px !important;
    right: 0px !important;
    z-index: 1000 !important;
    background: #aedb34 !important;
    backdrop-filter: blur(5px);
    min-width: 180px;
    max-width: 215px;
    height: 38px;
    transition: background-color 0.2s ease;
}


/* When collapsed */
#display-settings-content[style*="display: none"] {
    max-height: 0;
    padding: 0 12px;
}

/* Collapsed state - override min-width */
#display-settings-overlay:has(#display-settings-content[style*="display: none"]) {
    min-width: 60px;
}

/* Fallback for browsers that don't support :has() */
.display-settings-collapsed {
    min-width: 60px !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    #enhanced-track-info {
        width: 300px;
    }
    
    #display-settings-overlay {
        right: 0px !important;
        top: 0px !important;
        min-width: 160px;
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    .map-wrapper {
        flex-direction: column-reverse;
        height: auto;
    }

    .map-touch-toggle {
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
        padding-left: 14px;
        padding-right: 14px;
    }

    .ol-map {
        height: 500px;
        width: 100%;
        border-left: 2px solid #34495e;
        border-right: 2px solid #34495e;
    }
    
    #enhanced-track-info {
        width: 100%;
        height: auto;
        max-height: 400px;
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    #display-settings-overlay {
        right: 0px !important;
        top: 0px !important;
        min-width: 140px;
        max-width: 180px;
    }
    
    .display-settings-header {
        padding: 8px 10px;
        font-size: 0.9em;
    }
    
    #display-settings-content {
        padding: 10px;
        font-size: 0.85em;
    }
}
    
    .display-settings-header {
        padding: 8px 10px;
        font-size: 0.9em;
    }
    
    #display-settings-content {
        padding: 10px;
        font-size: 0.85em;
    }
