﻿* {
  box-sizing: border-box;
}

html {
  /* Allow natural viewport scrolling */
  overflow-x: hidden;
  overscroll-behavior: none;
  /* Strict bounce prevention */
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background-color: #1c1c1e;
  color: #ffffff;
  overflow-y: visible;
  overscroll-behavior: none;
  /* Prevent bounce (pull-to-refresh feel) */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  overflow-anchor: none;
}

/* Hide scrollbar globally for Chrome, Safari and Opera */
*::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
* {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

/* Global Bell Icon Styling */
.bell-icon {
  fill: currentColor;
  transition: fill 0.2s, stroke 0.2s;
}

.bell-hollow {
  fill: none !important;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  /* Match flight list padding for main app title alignment */
  background-color: #2c2c2e;
  overflow: visible;
  /* Allow dropdown to escape */
}

.header-right {
  display: flex;
  align-items: center;
  position: relative;
  overflow: visible;
  gap: 12px;
  /* Uniform spacing between icons and OAT section */
}

/* -------- REVOLVER UI -------- */
/* -------- REVOLVER UI -------- */
.static-title {
  font-size: 18px;
  font-weight: 400;
  /* Thinner to avoid blooming */
  color: #f5f5f7;
  /* Soft white to match OAT and Revolver active */
  user-select: none;
  white-space: pre;
  position: relative;
  z-index: 20;
  text-shadow: none !important;
  -webkit-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  /* Consistent vertical centering */
  height: 44px;
  display: flex;
  align-items: center;
  line-height: 1;
}

@media (max-width: 1200px) {
  .static-title {
    font-size: 0;
    /* Hide original text, replaced by ::after */
  }

  .static-title::after {
    content: "IceMan";
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
  }
}

.revolver-wrapper {
  height: 44px;
  /* Increased for better touch target (Apple HIG minimum) */
  overflow: visible;
  position: relative;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: min-width 0.3s ease;
  z-index: 10;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-left: 6px;
  perspective: 800px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: pan-x;
  /* Allow horizontal swipe only, prevent vertical pull */
  padding: 8px 0;
  /* Extra vertical touch area */
}

.revolver-wrapper:focus,
.revolver-wrapper:active {
  outline: none;
  background-color: transparent;
  /* Ensure no grey background */
  -webkit-tap-highlight-color: transparent;
}

/* .revolver-wrapper:hover {} */

/* .revolver-wrapper:hover {} */

.revolver-guide {
  font-size: 18px;
  font-weight: 400;
  visibility: hidden;
  /* Reserve space but invisible */
  padding: 0 20px 0 0;
  /* Extra breathing room ONLY on right */
  white-space: nowrap;
}

.revolver-visual-container {
  position: absolute;
  top: -12px;
  /* Constrain to header height (12px padding) */
  bottom: -12px;
  left: 0;
  width: 100%;
  background-color: transparent;
  border-radius: 0;
  border: none;
  /* transition: top/bottom removed to eliminate screen effect */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  perspective: 500px;
  z-index: 10;
  overflow: hidden;
  pointer-events: none;
  /* Soft cloud mask at edges */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
}

/* Expand on hover/interact to reveal neighbors through the cloud */
/* Ghost Effect Interaction: Neighbors fade in */
@media (hover: hover) {
  .revolver-wrapper:hover .revolver-item {
    opacity: 1;
    filter: blur(0);
  }
}

.revolver-wrapper.interacting .revolver-item {
  opacity: 1;
  filter: blur(0);
}

/* Compensate for container expansion to keep mask stationary */
/* .revolver-wrapper:hover .revolver-mask - Removed */

/* Also compensate BG list to keep it stationary */
/* .revolver-wrapper:hover #revolver-list-bg - Removed */

/* .revolver-mask - Removed */
/* .revolver-mask .revolver-list - Removed */

/* Single List Styles */
.revolver-list {
  position: relative;
  width: 100%;
  height: 30px;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.revolver-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 18px;
  font-weight: 400;
  color: #8e8e93;
  user-select: none;
  white-space: nowrap;
  backface-visibility: hidden;

  /* Ghost State: Hidden & Blurred */
  opacity: 0;
  filter: blur(5px);

  /* Smooth Ghost Fade Out (Trail) - Default FAST for Taps */
  transition: opacity 0.15s linear, filter 0.15s linear, color 0.15s;

  text-shadow: none !important;
  -webkit-font-smoothing: grayscale;
  line-height: 30px;
  letter-spacing: -0.01em;
}

/* Slow Fade Out only when releasing from a Hold/Interact */
.revolver-wrapper.fading-out .revolver-item {
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), filter 0.8s linear, color 0.3s;
}

@media (max-width: 450px) {
  .revolver-item {
    font-size: 18px;
  }
}

.revolver-item.active {
  color: #f5f5f7;
  /* Active Soft White */
  text-shadow: none !important;
  -webkit-font-smoothing: grayscale;

  /* Active is ALWAYS visible. No exceptions. */
  opacity: 1 !important;
  filter: blur(0) !important;
  z-index: 2;
  /* Fast but smooth fade in (0.1s) to avoid hard glitchy pop */
  transition: opacity 0.1s linear, filter 0.1s linear, color 0.3s !important;
}

/* Info Card Visual Example - Revolver */
.info-operator-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

.info-operator-text {
  flex: 1;
  min-width: 0;
}

.info-feature-label {
  margin-bottom: 2px;
}

.info-revolver-example {
  background-color: #2c2c2e;
  border-radius: 8px;
  padding: 8px 0;
  /* Compact vertical padding */
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  /* Vertical mask for the stack - Softer Fade */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 40%, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 40%, black 60%, transparent 100%);

  flex-shrink: 0;
  width: 140px;
  /* Constrain horizontal width */
}

.info-revolver-container {
  display: flex;
  flex-direction: column;
  /* Vertical Stack */
  align-items: center;
  /* Centered in the compact box */
  gap: 2px;
  /* Tighter gap */
  justify-content: center;
}

.info-revolver-item {
  font-size: 14px;
  /* Smaller base size */
  font-weight: 400;
  white-space: nowrap;
  user-select: none;
  line-height: normal;
}

.info-revolver-item.active {
  color: #f5f5f7;
  font-weight: 400;
  font-size: 18px;
  /* Smaller active size */
}

.info-revolver-item.side {
  color: #8e8e93;
  opacity: 0.5;
  font-size: 14px;
}

.info-feature-subtext {
  font-size: 14px;
  color: #8e8e93;
  margin-top: 0;
  line-height: 1.4;
}

/* #revolver-list-bg .revolver-item {} */

/* Foreground list (White) - REMOVED */
/* #revolver-list-fg .revolver-item {} */

/* Hide active class logic as we use masking now */
/* .revolver-item.active {} */

/* Show neighbors slightly on hover */
/* .revolver-wrapper:hover .revolver-item {} */

/* Keep active fully visible on hover */
/* .revolver-wrapper:hover .revolver-item.active {} */



.oat {
  font-size: 16px;
  font-weight: 500;
  color: #f5f5f7;
  border-left: 1px solid #3a3a3c;
  line-height: normal;
  width: 88px;
  flex-shrink: 0;
  margin: 0;
  padding-left: 12px;
  /* Same gap as icons-to-separator */
  white-space: nowrap;
  display: flex;
  align-items: center;
  height: 20px;
}

.oat-label {
  /* Fixed width so "Mix" and "OAT" occupy same space */
  width: 28px;
  text-align: left;
  flex-shrink: 0;
}

.oat-colon {
  flex-shrink: 0;
  margin-right: 4px;
}

.oat-value {
  flex: 1;
  text-align: right;
}

@media (max-width: 400px) {
  .oat {
    font-size: 14px;
    padding-left: 12px;
    width: 85px;
  }
}

/* Audio Button States */

/* Speaker body styling - matches bell icon style */
#btn-audio .speaker-body {
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  transition: fill 0.2s, stroke 0.2s, transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-origin: center center;
}

#btn-audio .speaker-curves {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Muted state: hollow speaker, no curves */
#btn-audio.audio-off {
  color: #ffffff;
  opacity: 1;
}

#btn-audio.audio-off .speaker-body {
  fill: none;
  stroke: currentColor;
  /* Enlarge and center: Body center x=7.5 -> 12, scaled for visual weight parity with bell */
  transform: translateX(4.5px) scale(1.3);
}

/* Enabled state: filled speaker with curves */
#btn-audio.audio-on {
  color: #ffffff;
  opacity: 1;
}

#btn-audio.audio-on .speaker-body {
  fill: currentColor;
  stroke: currentColor;
  transform: translateX(0) scale(1.05);
}

#btn-audio.audio-on .speaker-curves {
  opacity: 1;
  transform: scale(1.05);
}

main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 100px);
  min-height: calc(100dvh - 100px);
  /* Adjust based on header/footer */
  padding-bottom: calc(25px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

/* -------- FLIGHT ROW -------- */

#flights {
  display: flex;
  flex-direction: column;
  /* flex-grow: 1; - REMOVED to allow "Other Flights" to hug the list */
  width: 100%;
}

/* Using absolute positioning for badge to satisfy "middle of left side and bay" requirement */
.flight {
  position: relative;
  /* Anchor for absolute badge */
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  grid-template-rows: auto auto;
  align-items: center;
  border-radius: 10px;
  background-color: #1c1c1e;
  border-bottom: 6px solid transparent;
  /* Replaces margin to capture gap clicks */
  margin-bottom: 0px;
  background-clip: padding-box;
  /* Prevent background from bleeding into the new border gap */
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  /* RULE: DO NOT ADD BACKGROUND TRANSITION TO AVOID HOVER FADE */
  transition: transform 0.3s ease-out;
}

/* Specific styling for flights in the main list (removed spacing) */
#flights .flight {
  padding: 12px;
}

@media (max-width: 450px) {
  #flights .flight {
    padding: 12px;
    border-bottom: 6px solid transparent;
  }
}

/* Specific styling for ACTIVE flights in the main list (removed spacing) */
#flights .flight.active {
  margin-bottom: 0;
  border-radius: 0;
  border-bottom: 0px;
  /* Overrides the transparent gap border */
}

#flights .flight.first-active {
  border-top-left-radius: 10px !important;
  border-top-right-radius: 10px !important;
}

#flights .flight.last-active {
  border-bottom-left-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
}

.flight.active {
  background-color: rgba(48, 209, 88, 0.1);
}

.flight.new-flight {
  animation: flash-highlight 4s ease-out forwards;
}

.selected-flight {
  z-index: 10;
  /* iOS Liquid Glass: intense blur without the white overlay */
  background-color: transparent !important;
  backdrop-filter: blur(25px) saturate(180%) brightness(1.2);
  -webkit-backdrop-filter: blur(25px) saturate(180%) brightness(1.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.flight.active.selected-flight {
  background-color: rgba(48, 209, 88, 0.2) !important;
}

.other-flight.zebra-alt.selected-flight {
  background-color: transparent !important;
}

.selected-flight::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 10px;
  border: 1px solid #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  pointer-events: none;
  z-index: 20;
}

@keyframes flash-highlight {
  0% {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
  }

  100% {
    background-color: #1c1c1e;
    box-shadow: none;
  }
}

.flight-badge-pinned {
  grid-row: 2;
  grid-column: 1 / -1;
  /* Span full width to respect percentage margin */
  justify-self: start;
  align-self: center;
  /* Center on ACREG horizontal midline */

  margin-left: 28%;
  /* Tuned to sit between ACREG (Left) and Bay (Center) */
  transform: translateX(-50%);

  z-index: 10;
  pointer-events: none;
  /* Let clicks pass through */
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.flight-badge-pinned>span {
  margin-right: 0;
  margin-left: 0;
}

@media (max-width: 450px) {
  .flight-badge-pinned {
    margin-left: 28%;
    /* Match desktop positioning for consistent centering between ACREG and Bay */
  }
}

/* Flatten the structure to control alignment of grandchildren directly */
.left,
.center,
.right {
  display: contents;
}

/* Column 1: Left (Phonetic + Acreg) */
.phonetic {
  grid-column: 1;
  grid-row: 1;
  align-self: baseline;
  justify-self: start;

  font-size: 12px;
  line-height: normal;
  /* Reset to normal for better alignment */
  color: #b0b0b0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;

  /* Hitbox */
  padding: 15px 40px 5px 0;
  margin: -15px -40px -5px 0;
  cursor: pointer;
  touch-action: pan-y;
  z-index: 10;
}

.model-label {
  font-size: 10px;
  opacity: 0.8;
  font-weight: 500;
  color: #bababa;
  margin-top: 1px;
}

.agent-label {
  font-size: 10px;
  opacity: 0.9;
  font-weight: 500;
  letter-spacing: 0.02em;
  pointer-events: none;
  /* Let clicks pass to parent .phonetic */
}

.acreg-wrapper {
  grid-column: 1;
  grid-row: 2;
  align-self: baseline;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 50px;
  /* Gap between ACREG text (effective end) and Badge */
  z-index: 5;
  /* Match hierarchy */
  cursor: pointer;
  padding: 5px 40px 15px 0;
  /* Add top/bottom padding to stretch hitbox visually without layout change */
  margin: -5px -40px -15px 0;
  /* Negate padding */
  touch-action: pan-y;
}

.acreg {
  align-self: center;
  /* Midline alignment */
  justify-self: start;

  font-size: 32px;
  font-weight: 700;
  cursor: pointer;
  min-height: 38px;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;

  /* Increase Hitbox to full card height */
  padding: 30px 40px 30px 0;
  margin: -30px -40px -30px 0;
  touch-action: pan-y;

  /* Springy snap-back */
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s, letter-spacing 0.3s;
  will-change: transform, filter;

  color: #e5e5ea;
}

.acreg.snap-ready,
.of-acreg.snap-ready {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
  transform: scale(1.08);
  /* Tactile "pop" feedback */
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Sleek switch animation */
@keyframes reg-switch-in {
  0% {
    opacity: 0;
    transform: translateY(5px) scale(0.95);
    filter: blur(4px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.acreg.switching,
.of-acreg.switching {
  animation: reg-switch-in 0.4s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

.acreg.pulling,
.of-acreg.pulling {
  transition: none;
}

/* Column 2: Center (Status + Bay) */
.status {
  grid-column: 2;
  grid-row: 1;
  align-self: baseline;
  /* Changed from end to baseline */
  justify-self: center;

  font-size: 12px;
  line-height: normal;
  color: #b0b0b0;
  margin: 0;

  /* Flex for stacking sub-status */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sub-status-label {
  font-size: 9px;
  font-weight: 500;
  opacity: 0.7;
  letter-spacing: 0.5px;
  color: #8e8e93;
  margin-top: 1px;
}

.bay-wrapper {
  grid-column: 2;
  grid-row: 2;
  align-self: baseline;
  justify-self: center;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  min-width: 140px;
  /* Ensure sufficient spread on mobile */
}

.badge-container {
  display: flex;
  align-items: center;
}

.flight-type-wrapper {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flight-type-label {
  font-size: 24px;
  font-weight: 700;
  color: #bababa;
  letter-spacing: 0.5px;
  line-height: normal;
  text-transform: uppercase;
}

.bay-number {
  grid-column: 2;
  justify-self: center;
  padding-left: 0;
  min-width: 70px;
  /* Reserve space for standard bay number width */
  text-align: center;

  white-space: nowrap;
  position: relative;
  font-size: 32px;
  font-weight: 700;
  color: #e5e5ea;
}

.old-bay {
  position: absolute;
  bottom: 100%;
  /* Position above the parent .bay-number */
  left: 50%;
  transform: translateX(-50%);
  /* Centered horizontally relative to parent */
  font-size: 16px;
  color: #8e8e93;
  text-decoration: line-through;
  opacity: 0.8;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  margin-bottom: -4px;
}

/* Column 3: Right (TimeTag + Time) */
.time-tag {
  grid-column: 3;
  grid-row: 1;
  align-self: baseline;
  /* Changed from end to baseline */
  justify-self: end;

  font-size: 12px;
  line-height: normal;
  color: #b0b0b0;
  margin-bottom: 0;
}

.time-wrapper {
  grid-column: 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  align-self: baseline;
  min-height: 38px;
  position: relative;
}

.time {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  position: relative;
  /* Anchor for absolute old-time */
  color: #e5e5ea;
}

.old-time {
  position: absolute;
  bottom: 100%;
  /* Position above the parent .time */
  right: 0;
  font-size: 16px;
  /* Matched with old-bay */
  color: #8e8e93;
  text-decoration: line-through;
  opacity: 0.8;
  line-height: 1;
  white-space: nowrap;
  margin-bottom: -4px;
  /* Matched with old-bay */
}

/* Mobile Responsive Flight Card */
@media (max-width: 450px) {
  .flight {
    grid-template-columns: minmax(80px, 1fr) minmax(60px, auto) minmax(70px, 1fr);
    padding: 8px 12px;
    /* Increase horizontal padding to ensure left edge spacing doesn't feel gone */
    /* Removed overflow: hidden to allow the fake border margins to be interacted with fully */
  }

  .acreg {
    font-size: 24px;
    min-height: 30px;
  }

  .bay-number {
    font-size: 32px;
    min-height: 40px;
  }

  .time {
    font-size: 24px;
    min-height: 30px;
  }

  .status {
    white-space: nowrap;
    /* Prevent "OFF BLOCK" from wrapping */
  }

  .phonetic,
  .status,
  .time-tag {
    font-size: 10px;
  }

  .phonetic {
    margin: -11px -40px -9px 0;
  }

  .status {
    margin-top: 0;
    margin-bottom: 0;
  }

  .time-tag {
    margin-top: 0;
    margin-bottom: 0;
    transform: none;
  }

}

/* -------- COLORS -------- */

.green {
  color: #30d158;
}

.red {
  color: #ff453a;
}

.blue {
  color: #64d2ff;
}

.orange {
  color: #ff9f0a;
}

.gray {
  color: #8e8e93;
}

.requested,
.bay-assigned,
.changes {
  color: #bababa;
  /* Light Grey (softer than white) */
}

.requested-bg {
  background-color: transparent;
}

/* -------- EMPTY STATE -------- */

.empty {
  margin-top: 20px;
  text-align: center;
  font-size: 16px;
  color: #8e8e93;
}

/* -------- ANIMATIONS -------- */

@keyframes newFlightPulse {
  0% {
    background-color: #1c1c1e;
  }

  50% {
    background-color: #333333;
  }

  /* Subtle lighter gray */
  100% {
    background-color: #1c1c1e;
  }
}

/* .new-flight animation removed */
/* .new-flight animation removed */

/* -------- INSTALL GUIDE (In Menu) -------- */
.menu-install-guide {
  display: block;
  margin-top: 12px;
  padding-top: 4px;
}

/* Zebra Striping for Other Flights */
.flight.zebra-alt {
  background-color: #2c2c2e;
}

.install-header {
  font-size: 11px;
  text-transform: uppercase;
  color: #f5f5f7;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.install-tag {
  font-size: 9px;
  background-color: #ff453a;
  color: white;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 700;
}

.install-note {
  font-size: 11px;
  color: #8e8e93;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.install-row {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: #b0b0b0;
  margin-bottom: 6px;
  line-height: 1.2;
}

.install-label {
  color: #ffffff;
  margin-right: 4px;
  font-weight: 500;
}

.install-icon {
  font-weight: bold;
  font-size: 14px;
  line-height: 1;
}

.install-arrow {
  margin: 0 4px;
  color: #636366;
}

.install-action {
  color: #30d158;
  font-weight: 500;
}

/* Hide if running as PWA */
@media all and (display-mode: standalone) {
  .menu-install-guide {
    display: none !important;
  }
}


.badge-new {
  display: inline-block;
  background-color: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 8px;
  /* Space before Bay Number */
  margin-left: 0;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-cxl {
  display: inline-block;
  background-color: transparent;
  color: #ff453a;
  border: 1px solid rgba(255, 69, 58, 0.7);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 8px;
  margin-left: 0;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-chg {
  display: inline-block;
  background-color: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 8px;
  margin-left: 0;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-inb {
  display: inline-block;
  background-color: transparent;
  color: #64d2ff;
  border: 1px solid rgba(100, 210, 255, 0.7);
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 999px;
  margin-right: 8px;
  margin-left: 0;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@keyframes breatheEffect {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
    /* Subtle pump */
  }

  100% {
    transform: scale(1);
  }
}


.changed-pulse {
  animation: breatheEffect 2s ease-in-out forwards;
}




@keyframes alarm-breathe {
  0% {
    filter: brightness(1);
    background-color: #1c1c1e;
  }

  50% {
    filter: brightness(1.5);
    background-color: #2c2c2e;
  }

  100% {
    filter: brightness(1);
    background-color: #1c1c1e;
  }
}

/* -------- ALARM MENU (Dropdown) -------- */

.header-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  margin-right: 0;
  /* Space managed by .header-right gap */
  transition: color 0.3s, opacity 0.3s;
  position: relative;
  z-index: 101;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 22px;
  /* Set to icon size for symmetrical gap calculation */
  height: 44px;
  /* Hit target height */
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

.select-all-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  color: #f5f5f7;
  padding: 2px 6px;
  opacity: 0.8;
  transition: background 0.2s, opacity 0.2s;
  user-select: none;
  -webkit-user-select: none;
}

.select-all-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  opacity: 1;
}

.select-all-btn.un-highlight {
  background: rgba(255, 255, 255, 0.1) !important;
  opacity: 0.8 !important;
}

.header-btn svg {
  stroke: currentColor;
  stroke-width: 1.2;
  fill: none;
}

.header-btn:hover,
.header-btn.active {
  /* filter: none; */
  opacity: 0.8;
  /* Simple hover effect since we removed filter */
}

.alarm-menu {
  position: fixed;
  top: 60px;
  right: 120px;
  left: auto;
  width: 240px;
  /* Right edge under the bell, with original fixed width */
  background-color: #2c2c2e;
  border: 1px solid #3a3a3c;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 16px;
  /* More padding */
  z-index: 9999;
  /* Very high z-index */

  /* Animation Origin: Top Right (Bell icon location) */
  transform-origin: top right;
  animation: menu-pop-shake 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  /* Bouncy pop */
  /* Bouncy pop */
  overflow-y: auto;
  max-height: 80vh;
  /* Ensure scrollbar doesn't look ugly */
  /* Ensure scrollbar doesn't look ugly */
  scrollbar-width: none;
  /* scrollbar-color removed */
}

@media (max-width: 450px) {
  .alarm-menu {
    left: 10px;
    right: auto;
    width: 240px;
    top: 60px;
  }
}

.alarm-menu.hidden {
  display: none;
  animation: none;
  /* Reset animation */
}

@keyframes menu-pop-shake {
  0% {
    transform: scale(0.5) rotate(-10deg) translateY(-20px);
    opacity: 0;
  }

  60% {
    transform: scale(1.05) rotate(2deg) translateY(0);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0deg) translateY(0);
    opacity: 1;
  }
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.menu-header h3 {
  margin: 0;
  font-size: 14px;
  color: #f5f5f7;
  /* Match title text color */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.menu-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  font-size: 16px;
  /* Bigger base font */
  cursor: pointer;
  user-select: none;
  color: #fff;
  padding: 6px 0;
  /* Easier target */
}


.checkbox-container input {
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
  margin: 0;
  margin-right: 14px;
  width: 22px;
  height: 22px;
  border: 2px solid #636366;
  border-radius: 6px;
  /* Rounded corners on all devices */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s, border-color 0.2s;
}

.checkbox-container input::after {
  content: "";
  width: 12px;
  height: 12px;
  background-color: transparent;
  /* Checkmark shape */
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0);
  transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.checkbox-container input:checked {
  background-color: #ffffff;
  /* High contrast white background */
  border-color: #ffffff;
}

.checkbox-container input:checked::after {
  transform: scale(1);
  background-color: #2c2c2e;
  /* Dark checkmark on white background */
}

@media (max-width: 450px) {
  .checkbox-container {
    font-size: 18px;
    /* Even bigger on mobile */
    padding: 10px 0;
    /* Larger spacing */
  }

  .checkbox-container input {
    width: 28px;
    /* Larger for mobile touch */
    height: 28px;
    margin-right: 16px;
    border-radius: 8px;
  }

  .checkbox-container input::after {
    width: 16px;
    height: 16px;
  }
}

.menu-separator {
  height: 1px;
  background-color: #3a3a3c;
  margin: 8px 0;
}

.notify-icon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notify-icon-wrapper svg {
  color: #f5f5f7;
  fill: #f5f5f7;
}

.notify-badge {
  position: absolute;
  top: 0px;
  right: -2px;
  background-color: #ff375f;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
}

.notify-text {
  color: #f5f5f7;
  margin-left: 8px;
}

/* Alarm Triggered State */
.alarm-triggered {
  --alarm-color: #ffffff;
  /* Default White */
}

/* Header Glow Pulse Animation (Opacity based) */
@keyframes glow-pulse {

  0%,
  100% {
    opacity: 0.2;
    /* transform: scale(1); */
  }

  50% {
    opacity: 1;
    /* transform: scale(0.98); Removed to prevent size change */
  }
}

/* Apply Header Glow when alarm is triggered */
body.alarm-triggered header {
  position: relative;
  z-index: 50;
}

body.alarm-triggered header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  box-shadow: 0 10px 50px -5px rgba(255, 255, 255, 0.4);
  /* Softer, broader glow */
  animation: glow-pulse 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  /* Slower, smoother pulse */
  animation-delay: 0s;
  will-change: opacity, transform;
  pointer-events: none;
}



/* Apply violent shake to Bell button when alarm is triggered */
body.alarm-triggered #btn-alarm {
  animation: bell-shake 0.5s ease-in-out infinite both;
  transform-origin: 50% 10%;
}

body.alarm-triggered #btn-alarm svg {
  color: var(--alarm-color);
  stroke: var(--alarm-color);
}

/* Ensure List Border Glow - REMOVED */
/* body.alarm-triggered main { ... } */
/* @keyframes alarm-flash-border { ... } */

@keyframes bell-shake {
  0% {
    transform: rotate(0deg);
  }

  15% {
    transform: rotate(-25deg);
  }

  30% {
    transform: rotate(20deg);
  }

  45% {
    transform: rotate(-15deg);
  }

  60% {
    transform: rotate(5deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

/* Set Button */
.menu-btn-set {
  margin-top: 10px;
  width: 100%;
  padding: 8px;
  background-color: #3a3a3c;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

/* Pulse the specific flight that caused the alarm */
/* Pulse the specific flight that caused the alarm */
/* Alarm Source Pulse (Opacity based) */
.flight.alarm-source {
  position: relative;
  z-index: 10;
}

.flight.alarm-source::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  /* background-color: #2c2c2e; REMOVED to prevent covering text */
  box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.4);
  animation: glow-pulse 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  animation-delay: var(--anim-delay, 0s);
  /* will-change: opacity, transform; REMOVED to reduce complexity/crashes */
  pointer-events: none;
  border-radius: inherit;
  /* Ensure inset glow respects corners */
}


.menu-btn-set:active {
  background-color: #ff9f0a;
  color: #000;
}

/* Alarm Color States */
.alarm-active-red {
  color: #ff453a !important;
  fill: #ff453a !important;
  filter: none !important;
}

.alarm-active-green {
  color: #30d158 !important;
  fill: #30d158 !important;
  filter: none !important;
}

.alarm-active-blue {
  color: #64d2ff !important;
  fill: #64d2ff !important;
  filter: none !important;
}

.alarm-active-orange {
  color: #ff9f0a !important;
  fill: #ff9f0a !important;
  filter: none !important;
}

/* Pokeball Shake Animation */
@keyframes pokeball-shake {

  0%,
  100% {
    transform: rotate(0deg);
  }

  10% {
    transform: rotate(-10deg);
  }

  20% {
    transform: rotate(8deg);
  }

  30% {
    transform: rotate(-6deg);
  }

  40% {
    transform: rotate(4deg);
  }

  50% {
    transform: rotate(0deg);
  }

  /* Pause 50-100% */
}

.pokeball-shake {
  animation: pokeball-shake 2s ease-in-out infinite;
  transform-origin: 50% 10%;
}

/* Ensure the alarm button shakes when armed (any trigger enabled) */
#btn-alarm.pokeball-shake {
  animation: pokeball-shake 2s ease-in-out infinite;
  transform-origin: 50% 10%;
}

#btn-alarm.pokeball-shake svg {
  fill: #f5f5f7;
  color: #f5f5f7;
}

/* Synchronous Shake (Click Feedback) */
.pokeball-shake-once {
  animation: single-shake 0.5s ease-in-out forwards;
  transform-origin: 50% 10%;
}

@keyframes single-shake {
  0% {
    transform: rotate(0deg);
  }

  20% {
    transform: rotate(-25deg);
  }

  40% {
    transform: rotate(20deg);
  }

  60% {
    transform: rotate(-15deg);
  }

  80% {
    transform: rotate(5deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

/* Flight Details Popup (Fixed Bottom Panel) */
.flight-details-popup {
  position: fixed;
  top: auto;
  bottom: 8px;
  /* Flush with bottom visual edge */
  left: 50%;
  transform: translateX(-50%);

  background: rgba(28, 28, 30, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);

  /* Modern Bottom Sheet Styling */
  width: 96%;
  max-width: 600px;
  /* Cap width on larger screens */
  border-radius: 32px;
  /* Large rounded corners */
  padding: 32px 32px 16px 32px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 20px);
  /* Respect Home Bar */

  max-height: 80vh;
  overflow-y: auto;
  /* Prevent covering the whole screen */

  z-index: 9999;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);

  /* DEFAULT: Single Column */
  display: flex;
  flex-direction: column;
  gap: 12px;

  opacity: 0;
  animation: popup-in 0.17s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;

  /* No dragging */
  cursor: default;
  user-select: none;
}

/* WIDER SCREENS: Dual Column */
@media (min-width: 500px) {
  .flight-details-popup {
    gap: 16px;
  }
}

/* Removed: .fixed-bottom, drag handles, drag cursors */

/* Animation for entry */
@keyframes popup-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(100%);
    /* Slide up from bottom */
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.popup-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #8e8e93;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.popup-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

@media (max-width: 450px) {
  .flight-details-popup {
    top: auto;
    bottom: 8px;
    transform: translateX(-50%) scale(0.9);
    animation: mobile-popup-in 0.17s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }

  @keyframes mobile-popup-in {
    to {
      opacity: 1;
      transform: translateX(-50%) scale(1);
    }
  }
}

/* Layout: Single column by default (phones) */
.popup-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 20px;
}

/* Specific ordering for single column view */
.popup-grid [data-field="phonetic"] {
  order: 1;
}

.popup-grid [data-field="operator"] {
  order: 2;
}

.popup-grid [data-field="dest"] {
  order: 3;
}

.popup-grid [data-field="flight"] {
  order: 4;
}

.popup-grid [data-field="callsign"] {
  order: 5;
}

.popup-grid [data-field="type"] {
  order: 6;
}

.popup-grid [data-field="size"] {
  order: 7;
}

.popup-grid [data-field="gate"] {
  order: 8;
}

.popup-grid [data-field="runway"] {
  order: 9;
}

/* 2-Column Grid on wider screens (tablets/desktop) */
@media (min-width: 450px) {
  .popup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 40px;
  }

  /* Reset order for 2-column grid to maintain original layout */
  .popup-grid [data-field] {
    order: unset;
  }
}

/* Other flight popup specific: two columns even on small screens */
@media (max-width: 449px) {
  .other-flight-popup .popup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 10px;
  }

  .other-flight-popup .popup-grid [data-field] {
    order: unset;
  }

  .other-flight-popup .popup-label {
    font-size: 11px;
    margin-right: 6px;
    letter-spacing: 0.5px;
  }

  .other-flight-popup .popup-value {
    font-size: 13.5px;
  }
}


.popup-row {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  border-bottom: none;
  padding: 4px 0;
  min-width: 0;
}

.popup-row:last-of-type {
  border-bottom: none;
}

/* Nav Helper */
.popup-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  /* More space between buttons */
  margin-top: 8px;
  padding: 16px 0 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  /* Very subtle top line */
}

/* Landscape Mobile Optimization Removed - Global Grid Applies */

.nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, opacity 0.2s;
  color: #ffffff;
  touch-action: manipulation;
  /* Remove 300ms click delay on mobile */
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.nav-btn:active {
  transform: scale(0.95);
}

.nav-btn svg {
  width: 24px;
  height: 24px;
}

.nav-btn.disabled {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
}

.popup-label {
  font-size: 13px;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  flex-shrink: 0;
  margin-right: 12px;
}

.popup-value {
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  font-family: 'SF Mono', 'Roboto Mono', monospace;
  text-align: right;
  flex-shrink: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Overflowing type values: scrollable on touch/click */
.popup-value.type-scrollable {
  cursor: pointer;
  position: relative;
  -webkit-mask-image: linear-gradient(to left, transparent 0px, #000 20px);
  mask-image: linear-gradient(to left, transparent 0px, #000 20px);
}

/* Expanded: reveal full text */
.popup-value.type-expanded {
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  word-break: break-word;
  -webkit-mask-image: none;
  mask-image: none;
  /* Smooth max-height transition */
  animation: type-expand 0.25s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes type-expand {
  from {
    max-height: 1.4em;
  }

  to {
    max-height: 5em;
  }
}

/* Collapsed back from expanded */
.popup-value.type-collapsing {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  animation: type-collapse 0.2s ease-out forwards;
}

@keyframes type-collapse {
  from {
    max-height: 5em;
  }

  to {
    max-height: 1.4em;
  }
}

/* Audio Menu (Reuse Alarm Menu Styling) */
.audio-menu {
  position: fixed;
  top: 60px;
  right: 60px;
  /* Positioned under the speaker icon */
  background-color: #2c2c2e;
  border-radius: 12px;
  width: 240px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  border: 1px solid #3a3a3c;
  display: flex;
  flex-direction: column;
}

.audio-menu.hidden {
  display: none;
}

@media (max-width: 450px) {
  .audio-menu {
    left: auto;
    right: 40px;
    width: 240px;
    top: 60px;
  }
}

.audio-volume-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}


.volume-label {
  font-size: 13px;
  color: #8e8e93;
  display: flex;
  justify-content: space-between;
}

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range]:focus {
  outline: none;
}

/* Slider Track */
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  /* Dynamic gradient background for 'fill' effect */
  background: linear-gradient(to right, #ffffff var(--val, 100%), #48484a var(--val, 100%));
  border-radius: 3px;
}

/* Slider Thumb */
input[type=range]::-webkit-slider-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -7px;
  /* center it */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}


/* Badge Stale */
.badge-stale {
  background-color: #3a3a3c;
  color: #98989d;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Smooth Registration Reveal */
/* Smooth Registration Reveal - Re-imagined */
.reg-prefix {
  display: inline-block;
  /* Default Open State */
  max-width: 60px;
  /* Generous for 2-3 chars */
  opacity: 1;
  filter: blur(0px);

  /* Re-imagined: Spring Snap */
  /* Using standard 'back-out' easing for the snap effect */
  transition:
    max-width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.3s ease-out;
  /* Filter removed */

  white-space: nowrap;
  overflow: hidden;
  vertical-align: bottom;
  will-change: max-width, opacity;
}

/* Closed State (Short Mode) */
.short-mode .reg-prefix {
  max-width: 0px;
  opacity: 0;
  /* scale removed */
  /* filter removed */

  /* Smooth Snap Close */
  transition:
    max-width 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.1s ease-out;
  /* Accelerated fade out */
}

/* Drag Animation Support - Tweaked for Body application */
body.is-dragging-reg .reg-prefix {
  transition: none !important;

  /* Map progress to max-width (0 -> 60px) */
  max-width: calc(var(--acreg-drag-progress, 0) * 60px) !important;

  /* Map progress to opacity (0 -> 1) with acceleration */
  opacity: calc(var(--acreg-drag-progress, 0) * 4);

  filter: none;
}


/* -------- INFO BUTTON -------- */

.info-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;

  /* Minimal Floating Style */
  background: rgba(44, 44, 46, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  /* Subtle border */
  border: 1px solid rgba(255, 255, 255, 0.15);

  /* Soft shadow for depth */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

  color: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  padding: 0;
  overflow: hidden;
  font-family: "Times New Roman", Times, serif;
  pointer-events: auto;
}

.fixed-bottom-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1002;
}

.info-icon-text {
  font-size: 22px;
  font-weight: 475;
  line-height: 1;
  color: #ffffff;
}

.info-btn:hover {
  background: rgba(58, 58, 60, 0.9);
  transform: scale(1.05);
}

.info-btn:active {
  transform: scale(0.95);
  background: rgba(28, 28, 30, 0.9);
}

.info-btn:active {
  transform: scale(0.95);
  background: rgba(28, 28, 30, 0.9);
}

/* -------- INFO OVERLAY & CARD -------- */

.info-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  /* Dim background */
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Card pushed to bottom via margin-top: auto instead of justify-content */
  overflow-y: auto;
  overscroll-behavior: none;
  padding: 5% 0 2% 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.info-overlay.active {
  opacity: 1;
  visibility: visible;
}

.info-overlay.hidden {
  display: flex !important;
  /* Override .hidden display:none to use opacity transition */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.info-card {
  width: 90%;
  max-width: 500px;
  background: rgba(44, 44, 46, 0.85);
  /* Liquid Glass Dark */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  /* Padding moved to info-content for internal scrolling */
  padding: 0;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  color: #f5f5f7;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  margin: 0;
  margin-top: auto;
}

.info-overlay.active .info-card {
  transform: scale(1);
}


.info-content {
  padding: 15px 24px 0px 24px;
  /* Top Right Bottom Left - removed bottom to let footer sit flush */
}



.info-content h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 22px;
}

.info-content p {
  line-height: 1.5;
  color: #d1d1d6;
}

.feedback-section {
  margin-top: 0;
  margin-bottom: 24px;
  padding-top: 0;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  text-align: center;
}

.feedback-section h3 {
  font-size: 18px;
  font-weight: 500;
  color: #f5f5f7;
  margin: 0 0 8px 0 !important;
  /* Force zero top margin */
  padding-top: 0;
}

.feedback-section p {
  font-size: 14px;
  color: #8e8e93;
  margin-bottom: 12px;
}

.feedback-input {
  width: 100%;
  height: 80px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.feedback-input:focus {
  border-color: #0a84ff;
  background: rgba(255, 255, 255, 0.1);
}

.feedback-input::placeholder {
  color: #636366;
}

.feedback-btn {
  background-color: #0a84ff;
  /* Apple System Blue */
  color: #ffffff;
  border: none;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s, opacity 0.2s;
  width: 100%;
  display: block;
}

.feedback-btn:hover {
  background-color: #007aff;
  transform: scale(1.02);
}

.feedback-btn:active {
  transform: scale(0.98);
  background-color: #0071e3;
}

.feedback-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.feedback-status {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
}

.feedback-status.success {
  color: #30d158;
  /* Apple Green */
}

.feedback-status.error {
  color: #ff453a;
  /* Apple Red */
}

.feedback-status.hidden {
  display: none;
}

.acknowledgment-footer {
  position: absolute;
  bottom: 0px;
  /* Fixed at the bottom inside the card */
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  /* Ignore clicks until pulled into view */
  cursor: default;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  /* Full width neutral line */
  background: linear-gradient(to bottom, transparent 0%, #1c1c1e 30%, #1c1c1e 100%);
}

/* Transform up permanently when revealed */
.info-card.footer-revealed .info-content {
  padding-bottom: 60px !important;
  /* Dramatic glide — immediate response, smooth luxurious deceleration */
  transition: padding-bottom 0.85s cubic-bezier(0.08, 0.82, 0.3, 1);
}

.acknowledgment-footer.permanently-revealed {
  opacity: 1 !important;
  pointer-events: auto !important;
  transition: opacity 1.1s ease-out !important;
  transform: translateZ(0) !important;
  /* Force hardware acceleration cleanly */
}

/* Starlike glow separator in the middle */
.acknowledgment-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.9), transparent);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6), 0 0 20px rgba(255, 255, 255, 0.2);
  opacity: 0;
  transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease-out;
  z-index: 1;
}

/* Only show the glow line once the footer is fully revealed, with a delay */
.acknowledgment-footer.permanently-revealed::before {
  opacity: 1;
  transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease-out 0.3s;
}

/* Programmatic expansion triggered via JS when locking, clicking, hovering, or pulling */
.acknowledgment-footer.is-inflated::before {
  width: 120px;
  box-shadow: 0 0 20px rgba(100, 200, 255, 0.8), 0 0 15px rgba(255, 100, 200, 0.5);
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.acknowledgment-footer.is-inflated .acknowledgment-text {
  filter: drop-shadow(0 0 15px rgba(255, 100, 200, 0.6));
}

.acknowledgment-footer.play-holo-anim .acknowledgment-text {
  animation: text-holo-sweep 1.6s cubic-bezier(0.25, 1, 0.5, 1) 0.14s forwards;
}

.acknowledgment-text {
  /* Premium luxury serif stack */
  font-family: "Didot", "Bodoni MT", "Cinzel", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-size: 16px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 400;
  position: relative;
  z-index: 2;
  cursor: pointer;
  padding: 10px 20px;

  /* Iridescent metallic base text fill */
  background: linear-gradient(110deg,
      #8e8e93 0%,
      #c4c4c8 10%,
      #ffffff 20%,
      /* Holographic Spectrum */
      rgba(255, 50, 150, 1) 35%,
      rgba(100, 100, 255, 1) 45%,
      rgba(0, 255, 255, 1) 55%,
      rgba(200, 50, 255, 1) 65%,
      /* Back to metal (Identical to 0-25% chunk for seamless looping) */
      #8e8e93 75%,
      #c4c4c8 85%,
      #ffffff 95%,
      #ffffff 100%);
  background-size: 400% auto;
  background-position: 100% center;
  color: #ab9b76;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  transition: filter 0.5s cubic-bezier(0.25, 1, 0.5, 1), background-position 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Hovering is now completely governed by javascript adding .play-holo-anim for the text sweep to prevent race conditions. The line expansion stays purely CSS below */

@keyframes text-holo-sweep {
  0% {
    background-position: 100% center;
  }

  100% {
    background-position: 0% center;
  }
}


.info-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: #f5f5f7;
  margin-top: 24px;
  margin-bottom: 12px;
}

.info-list {
  list-style-type: disc;
  padding-left: 20px;
  margin: 0;
  color: #d1d1d6;
}

.info-list li {
  margin-bottom: 12px;
  line-height: 1.5;
  font-size: 14px;
}

.info-list strong {
  color: #ffffff;
  font-weight: 600;
}

/* Ensure status colors work inside the info card */
.info-content .green,
.info-content .green strong {
  color: #30d158 !important;
}

.info-content .red,
.info-content .red strong {
  color: #ff453a !important;
}

.info-content .blue,
.info-content .blue strong {
  color: #64d2ff !important;
}

/* -------- OTHER FLIGHTS ANIMATION -------- */
.other-flights-wrapper {
  margin-top: auto;

  /* Push to bottom by default */
  border-top: none;
  overflow: hidden;
  /* Ensure content doesn't spill during transition */
  transition: margin-top 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
}

.other-flights-wrapper.snapped {
  margin-top: 20px;
  /* Standard spacing when opened/snapped to list */
}

.other-flights-wrapper:has(.expanded) {
  border-top: none;
}


/* FIXED Toggle Button at Bottom */
.other-flights-toggle {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s, background 0.2s;
  width: 44px;
  height: 44px;

  /* Positioned absolutely within .fixed-bottom-layer */
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  pointer-events: auto;

  /* Minimal Floating Style (Matching Info Btn) */
  background: rgba(44, 44, 46, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50%;

  /* Subtle Border */
  border: 1px solid rgba(255, 255, 255, 0.15);

  /* Soft Shadow */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (hover: hover) {
  .other-flights-toggle:hover {
    background: rgba(58, 58, 60, 0.9);
    transform: translateX(-50%) scale(1.05);
  }
}

.other-flights-toggle:active {
  transform: translateX(-50%) scale(0.92);
  background: rgba(28, 28, 30, 0.9);
}

.toggle-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.t-title,
.t-count {
  display: none;
  /* Hide labels */
}

.t-arrow {
  display: block;
  /* Was flex, but block is better for SVG */
  width: 23.5px;
  height: 23.5px;
  transform-origin: center center;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #fff;
  opacity: 0.9;
  /* Ensure stroke is crisp */
  shape-rendering: geometricPrecision;
}

/* Header Mode (Open) - Flip arrow */
.other-flights-toggle.header-mode svg.t-arrow {
  transform: rotate(180deg);
}

/* All other inner elements hidden (for legacy/fallback) */
/* All other inner elements hidden (for legacy/fallback) */
.other-flights-toggle .toggle-forecast,
.other-flights-toggle .t-title,
.other-flights-toggle .t-count {
  display: none !important;
}

/* Ensure no text-transform conflict (already uppercase above) */

/* HIDE the first group header when expanded, as the toggle button replaces it */
.other-flights-wrapper.snapped .other-flights-list .other-flights-inner .other-flights-group-header:first-child {
  display: none;
}

.forecast-line {
  font-size: 12px;
  opacity: 0.6;
  font-weight: 400;
  letter-spacing: 0.02em;
}



.other-flights-list {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-bottom: 80px;
  /* Space for fixed toggle */
  transition:
    max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.3s ease-out;
}

.other-flights-list.expanded {
  /* max-height: 2000px;  REMOVED - Handled by JS for smooth slide-up */
  /* Large enough to fit content */
  opacity: 1;
  transition:
    max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.3s ease-in;
}

.other-flights-inner {
  min-height: 0;
}

.other-flight {
  /* Specific styling overrides for items in the list */
  /* opacity: 0.8; Removed to match brightness */
  /* opacity: 0.8; Removed to match brightness */
  /* RULE: DO NOT ADD HOVER OPACITY/FADE TO .other-flight */
  /* transition: opacity 0.2s; REMOVED to prevent fade */
  cursor: pointer;
}

/* RULE: DO NOT REINTRODUCE HOVER EFFECT */
.other-flight:hover {
  opacity: 1 !important;
  filter: none !important;
  /* background-color should remain as defined by zebra striping */
}

.other-flight.zebra-alt {
  background-color: #232325;
}



.other-flights-group-header {
  padding: 8px 10px 4px 10px;
  font-size: 32px;
  font-weight: 700;
  color: #e5e5ea;
  text-transform: uppercase;
  border-top: none;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.other-flights-main-header {
  padding: 20px 10px 10px 10px;
  /* More top padding for breathing room */
  font-size: 32px;
  font-weight: 700;
  color: #e5e5ea;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  width: 100%;
}

.other-flights-group-header:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 5px;
}

/* --- NEW STYLES FOR FLIGHT TYPES --- */

/* De-emphasized (Inbound) - No specific styles needed for now */

/* Ensure Inbound flights don't "glow" (brighten) on hover */
/* RULE: NO HOVER EFFECTS */
/*.flight.de-emphasized:hover {
  background-color: #1c1c1e !important;
} - REMOVED */

.flight.de-emphasized .acreg {
  font-size: 24px;
  /* Smaller reg for inbound */
}

.flight.de-emphasized .time {
  font-size: 24px;
}


.stat-badge {
  background-color: #3a3a3c;
  color: #f5f5f7;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
  display: inline-block;
}


/* -------- COMPACT OTHER FLIGHTS -------- */

.flight.other-flight {
  grid-template-columns: minmax(auto, 1fr) auto minmax(auto, 1fr);
  grid-template-rows: 1fr;
  padding: 0px 0px;
  /* Removed padding and gap to let hitboxes touch all edges */
  margin-bottom: 0px;
  border-bottom: 0px;
  /* Overrides the transparent gap border */
  min-height: 36px;
  align-items: stretch;
  cursor: pointer;
}

.of-left {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  white-space: nowrap;
  padding-left: 12px;
  /* Replaces the left padding removed from the parent */
}

.of-reg-badge-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.of-badge-wrapper {
  display: flex;
  align-items: center;
}

.of-badge-wrapper:empty {
  display: none;
}

.of-acreg {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: #bababa;
  /* Default gray */
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s, letter-spacing 0.3s;
  will-change: transform, filter;

  /* Hitbox to full card height via flex stretch */
  margin: 0;
  padding-right: 8px;
  /* Replaces gap in of-left */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;

  /* Fixed width for static badge positioning */
  min-width: 65px;
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
}

.of-reg-wrapper {
  display: flex;
  align-items: stretch;
  gap: 30px;
  /* 30px gap between Reg and Badge */
}

.of-badge-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  pointer-events: none;
}

.of-badge-container:empty {
  display: none;
}

/* Base logic: By default (desktop/wide), mobile-inbound-status is hidden */
.mobile-inbound-status {
  display: none !important;
}

.of-badge-container .badge-text {
  display: none;
}

.of-badge-container .badge-icon {
  display: block;
}

/* Let clicks pass through inner spans to parent .of-acreg */
.of-acreg>* {
  pointer-events: none;
}

@media (min-width: 1201px) {
  .other-flight .of-left {
    align-items: center;
    /* Changed from stretch to strictly center vertically */
    gap: 8px;
    /* Slightly increased gap for breathing room next to ACREG */
  }

  .other-flight .of-reg-wrapper {
    order: 1;
    align-items: stretch;
    /* Replaced center with stretch to remove vertical dead space */
  }

  .other-flight .of-op {
    order: 2;
    padding-top: 0;
  }

  .other-flight .of-badge-container {
    order: 3;
    /* Badge acts as separator/status at end */
    align-self: center;
  }

  /* Remove horizontal spacing hacks to allow flex gap to control proximity */
  /* Remove vertical padding/margins to ensure true baseline alignment */
  .other-flight .of-acreg {
    margin: 0;
    padding: 0;

    /* CRITICAL: Remove fixed width so phonetic text hugs the ACTUAL text width */
    min-width: auto;
    width: auto;
    display: flex;
    /* maintain full height center */
    align-items: center;
    /* center text inside the stretched full height */
    line-height: normal;
    /* Reset tight mobile line-height so flex centers precisely */
  }

  /* Swap colors on wide screens: Time is Bright, Tag is Dim */
  .other-flight .of-time {
    color: #e5e5ea;
  }

  .other-flight .of-time-tag-top,
  .other-flight .of-time-tag-bottom {
    color: #8e8e93;
  }

}

.of-acreg.green {
  color: #30d158;
}

.of-acreg.red {
  color: #ff453a;
}

.of-acreg.blue {
  color: #64d2ff;
}

.of-acreg.orange {
  color: #ff9f0a;
}


.of-op {
  font-size: 11px;
  font-weight: 400;
  color: #636366;
  /* Faded */
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  cursor: pointer;
  padding-top: 0;
  padding-right: 12px;
  /* Replaces gap before status */
  display: flex;
  flex-direction: row;
  align-items: center;
  white-space: nowrap;
  line-height: normal;
  /* Reset line height to ensure clean centering */
  transform: translateY(0.5px);
  /* Fine-tuned visual center */
}

.of-sep {
  margin: 0 6px;
  color: #636366;
  font-size: 10px;
  display: inline-block;
}

@media (max-width: 1200px) {
  .of-sep {
    display: none;
  }
}

.of-phonetic-text {
  color: #8e8e93;
}

.of-agent-text {
  color: #8e8e93;
}

.of-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.of-status {
  font-size: 16px;
  font-weight: 700;
  color: #bababa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: pre-wrap;
  /* Allow wrapping */
  text-align: center;
}

.of-right {
  display: flex;
  align-items: center;
  /* Changed from stretch to strictly center its children */
  justify-content: flex-end;
  padding-right: 12px;
  /* Replaces parent right padding */
  padding-left: 12px;
  /* Replaces grid gap after status */
}

.of-time-tag {
  font-size: 11px;
  font-weight: 400;
  color: #636366;
  text-transform: uppercase;
  text-align: right;
  padding-top: 0px;
  /* Removed arbitrary 2px padding */
  margin-bottom: 0px;
  /* Removed -4px compensation */
  line-height: normal;
  /* Reset line height */
}

/* Wide screen time tag wrapper */
.of-time-tag-wrapper {
  display: flex;
  flex-direction: row;
  /* One line on wide screens */
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  /* Space between tags if there are two */
  margin-bottom: 0px;
  /* Removed -5px offset since container now centers perfectly */
}

.of-time {
  font-size: 16px;
  font-weight: 700;
  color: #bababa;
  display: flex;
  align-items: center;
  padding-left: 8px;
  /* Replaces gap in of-right */
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.of-time.green {
  color: #30d158;
}

.of-time.red {
  color: #ff453a;
}

.of-time.blue {
  color: #64d2ff;
}

.of-time.orange {
  color: #ff9f0a;
}





/* STALE FLIGHTS */
.flight.stale {
  opacity: 0.5;
  filter: grayscale(0.5);
  background-color: #2c2c2e;
}

/* Stale Badge */
.badge-stale {
  background-color: #636366;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Inbound Badge (Icon) */
.badge-inb.badge-icon {
  background-color: transparent;
  color: #64d2ff;
  padding: 0 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  border: 1px solid rgba(100, 210, 255, 0.7);
  width: auto;
  height: auto;
  min-width: 22px;
  min-height: 20px;
}

.badge-inb-wrapper {
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  pointer-events: auto;
  /* CRITICAL: Re-enable pointer events */
  padding: 2px;
  /* Touch target */
  border-radius: 4px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
  transform-origin: center center;
}

.badge-inb-wrapper.is-pressing {
  transform: scale(0.9) !important;
  opacity: 0.6;
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
}

.badge-inb-wrapper.press-success {
  animation: inboundSuccessPulse 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes inboundSuccessPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 450px) {

  /* Reduce visual dominance of Inbound Pill in Other List */
  .other-flight .badge-inb.badge-icon {
    transform: scale(0.9);
    border-color: rgba(100, 210, 255, 0.4);
    opacity: 0.9;
  }


}

/* Even less round (6px) for inbound pill in other list (Global) */
.other-flight .badge-inb {
  border-radius: 6px !important;
}

/* Gray Color for Mobile Only (max-width 1200px) */
@media (max-width: 1200px) {
  .other-flight .badge-inb {
    color: #8e8e93 !important;
    border-color: rgba(142, 142, 147, 0.5) !important;
  }

  .other-flight .badge-inb.badge-icon {
    color: #8e8e93 !important;
    border-color: rgba(142, 142, 147, 0.5) !important;
    opacity: 1;
  }
}



/* Forecast Styling */
.forecast-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

.forecast-line {
  font-size: 11px;
  color: #8e8e93;
  margin: 0;
  line-height: 1.3;
}

/* -------- FLOW FORECAST BRACKETS -------- */

.flow-cluster {
  position: relative;
  margin-bottom: 0;
}

.main-list-cluster {
  margin-bottom: 6px;
}

.flow-items {
  display: block;
}

.flow-items .flight {
  margin-bottom: 0px !important;
}



.flow-bracket {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 10px;
  border-right: 3px solid;
  border-top: 3px solid;
  border-bottom: 3px solid;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  opacity: 0.8;
  pointer-events: none;
  z-index: 5;
}

.flow-label {
  position: absolute;
  top: 50%;
  right: 22%;
  /* Approx halfway between center (status) and right (time/wall) */
  transform: translateY(-50%);
  background-color: transparent;
  /* Text only per request */
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 6px;
  border-radius: 4px;
  z-index: 10;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  /* Ensure visibility over potential content */
}

/* Modifiers */
.flow-cluster.increased .flow-bracket {
  border-color: #ff9f0a;
  /* Orange */
  filter: drop-shadow(0 0 6px #ff9f0a);
}

.flow-cluster.increased .flow-label {
  color: #ff9f0a;
  background-color: transparent;
}

.flow-cluster.high .flow-bracket {
  border-color: #ff453a;
  /* Red */
  filter: drop-shadow(0 0 6px #ff453a);
}

.flow-cluster.high .flow-label {
  color: #ff453a;
  background-color: transparent;
}

.other-flights-inner {
  padding-bottom: 40px;
}

/* -------- PRESETS ALARM MENU -------- */
.presets-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.presets-header {
  margin: 0;
  font-size: 14px;
  color: #f5f5f7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.preset-buttons {
  display: flex;
  gap: 8px;
}

/* Ensure buttons in preset group stretch evenly but keep original style */
.preset-buttons .select-all-btn {
  flex: 1;
  text-align: center;
  padding: 4px 6px;
  /* Slightly taller than original 2px for touch targets, but keeping style */
}

.preset-btn:active {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0.96);
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* -------- VERSION INFO -------- */
.info-version {
  font-size: 11px;
  color: #8e8e93;
  opacity: 0.6;
  font-family: monospace;
  margin-bottom: 20px;
  /* Space before Feedback section */
}

/* BOJUE MOVED MOBILE STYLES */
@media (max-width: 1200px) {
  .other-flight {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: 1fr;
    grid-template-areas:
      "acreg    status  right";
    gap: 0;
    padding: 0 12px 0 12px !important;
    /* Added left/right padding to match main list */
    min-height: 34px;
    align-items: stretch;
    height: auto;
    margin-bottom: 0px;
    margin-top: 0px;
    border-bottom: none;
  }

  /* Allow children to participate in grid */
  .of-left,
  .of-center,
  .of-op,
  .of-reg-wrapper {
    display: contents;
  }

  /* --- Row 1: Phonetic & Time Tag Top --- */
  .of-phonetic-text {
    display: none;
  }

  .of-time-tag-top {
    font-size: 8.4px;
    font-weight: 400;
    color: #8e8e93;
    text-transform: uppercase;
    line-height: 1;
  }

  /* --- Row 2: Agent & Time Tag Bottom & Badge --- */
  .of-agent-text {
    display: none;
  }

  .of-time-tag-bottom {
    font-size: 8.4px;
    font-weight: 400;
    color: #8e8e93;
    text-transform: uppercase;
    line-height: 1;
  }

  .of-badge-container {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    margin: 0;
    z-index: 2;
  }

  /* Mobile Badge Styling remains tight */
  .of-badge-container .badge-icon {
    display: none;
  }

  .of-badge-container .badge-text {
    display: inline-block;
    background-color: transparent;
    color: #64d2ff;
    border: 1px solid rgba(100, 210, 255, 0.7);
    font-size: 10.2px;
    font-weight: 700;
    padding: 0 4px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: normal;
  }

  /* --- Row 3: ACREG, STATUS, TIME --- */

  /* HIDE Desktop Badge completely on small screens */
  .desktop-only-badge {
    display: none !important;
  }

  /* SHOW Mobile Status and hide regular status ONLY IF it has an active inbound */
  .has-inbound .regular-status {
    display: none !important;
  }

  .has-inbound .mobile-inbound-status {
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin-top: -1.5px;
  }

  .of-acreg {
    grid-area: acreg;
    align-self: stretch;
    justify-self: start;
    font-size: 18px;
    font-weight: 700;
    color: #e5e5ea;
    padding: 0;
    margin: 0;
    line-height: 0.85;
    margin-top: 0px;
    display: flex;
    align-items: center;
    padding-left: 0;
    /* Padding handled by parent container now */
    padding-right: 6.6px;
    /* Replacing gap to status */
  }

  .of-status {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: max-content;
    max-width: 50vw;
    font-size: clamp(10px, 4.2vw, 18px);
    font-weight: 400;
    color: #e5e5ea;
    text-align: center;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    margin-top: 0px;
    letter-spacing: -0.2px;
    z-index: 10;
  }

  .mobile-inbound-status.badge-inb-wrapper {
    /* For the mobile centered status, the origin is already center because of the translate trick. */
    transform-origin: center center;
  }

  .of-time {
    font-size: 18px;
    font-weight: 700;
    color: #e5e5ea;
    line-height: 0.85;
    display: flex;
    align-items: center;
    padding-left: 2px;
    /* Replace the gap previously on .of-right */
  }

  .of-right {
    grid-area: right;
    justify-self: stretch;
    /* Change to stretch from end */
    display: flex;
    flex-direction: row;
    align-items: center;
    /* Center children vertically */
    justify-content: flex-end;
    gap: 0px;
    /* remove gap to avoid deadzone */
    margin-top: 0px;
    padding-right: 0;
    /* Padding handled by parent container now */
    padding-left: 6.6px;
    /* Replace gap from status */
  }

  .of-time-tag-wrapper {
    display: flex;
    flex-direction: column;
    /* Stack vertically on small screens */
    gap: 0px;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 0px;
    /* Reset the wide screen offset */
  }

  /* Hide Desktop Elements unused in Grid */
  .of-op-separator {
    display: none;
  }

  /* Ensure hitboxes are reasonable but tight */
  .of-acreg {
    padding: 1px 0;
  }
}

/* Wide Screen Status Visibility */
.wide-only {
  display: none;
}

@media (min-width: 1200px) {
  .wide-only {
    display: inline;
  }
}

/* -------- UNKNOWN OPERATOR ICON -------- */
.unknown-op-icon {
  display: none;
  color: #e5e5ea;
  margin-left: 6px;
  flex-shrink: 0;
}

@media (max-width: 1200px) {
  .unknown-op-icon {
    display: inline-block;
  }
}

.unknown-op-icon-popup {
  color: #e5e5ea;
}

.unknown-name-icon-popup {
  display: none;
  color: #e5e5ea;
}

@media (max-width: 450px) {
  .unknown-name-text-popup {
    display: none;
  }

  .unknown-name-icon-popup {
    display: inline-block;
  }
}

/* MAIN LIST ONLY Vertical Spacing Optimization */
#flights .flight .acreg-wrapper,
#flights .flight .bay-wrapper,
#flights .flight .time-wrapper {
  margin-top: -3px;
  /* Pulls bottom row closer globally (50% of original -6px) */
}

@media (max-width: 450px) {

  #flights .flight .acreg-wrapper,
  #flights .flight .bay-wrapper,
  #flights .flight .time-wrapper {
    margin-top: -4px;
    /* Even tighter on mobile (50% of original -8px) */
  }
}

/* Ensure old-bay and old-time lift off BAY and TIME text without squishing under STATUS */
#flights .flight .old-bay {
  bottom: 100%;
  margin-bottom: -4px;
  /* Hug parent text to maximize top clearance */
}

#flights .flight .old-time {
  bottom: 100%;
  margin-bottom: -4px;
  /* Hug parent text to maximize top clearance */
}