/* Small windows show feature/flight information over the bottom HUD.
   The same detail node keeps its scroll, follow and ATC player lifecycle. */
/* Detail visibility changes the badge presentation, never the follow state. */
body:has(#detail:not([hidden])) #follow-status{display:none}
.scene-status{position:fixed;right:24px;top:22px;display:flex;align-items:center;gap:8px;max-width:calc(100vw - 440px);z-index:8;pointer-events:none}
.scene-status>*{pointer-events:auto}
.scene-status .follow-status{position:static;flex:0 1 280px;min-width:0;max-width:none}
.scene-status .lighting-preview-status{position:static;display:flex;align-items:center;gap:5px;flex:none;padding:3px 6px 3px 9px;font-size:10px;line-height:1.5;white-space:nowrap;pointer-events:auto}
.lighting-preview-status #end-lighting-preview{position:relative;display:grid;place-items:center;flex:none;width:20px;height:20px;padding:0;border:0;border-radius:0;background:transparent;color:inherit;box-shadow:none}
.lighting-preview-status #end-lighting-preview .cta-icon{width:16px;height:16px}
.lighting-preview-status #end-lighting-preview:before{content:'';position:absolute;inset:-12px}
.follow-status{padding-top:6px;padding-bottom:6px}
.follow-status #restore-follow{display:block;flex:0 1 auto;min-width:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--accent);text-align:left;font-size:11px;line-height:1.5;overflow-wrap:anywhere}
@media(max-width:720px){
 :root{
  --small-detail-bottom:var(--operations-bottom,44px);
  --small-detail-height:min(300px,40dvh,max(80px,calc(100dvh - 200px - var(--small-detail-bottom))));
  --small-tools-obstacle:var(--operations-clearance,120px);
 }
 .topbar{flex-wrap:nowrap}
 .topbar .search-trigger{margin-left:auto}
 .airport-back{min-width:0}
 .airport-back span{min-width:0;overflow:hidden}
 .scene-status{right:14px;top:88px;max-width:calc(100vw - 84px)}
 .scene-status .follow-status{flex:0 1 auto}
 .follow-status{
  left:auto;right:14px;top:88px;bottom:auto;
  width:fit-content;max-width:calc(100vw - 84px);
  min-height:0;padding:3px 6px 3px 9px;gap:5px;z-index:8;
 }
 .follow-status #restore-follow{font-size:10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
 /* Share the available height when both independent cards are open. */
 body:has(#boarding-announcement:not([hidden])){
  --small-detail-height:min(300px,40dvh,max(72px,calc((100dvh - 180px - var(--small-detail-bottom))/2)));
  --small-tools-obstacle:calc(var(--operations-clearance,120px) + var(--small-announcement-occupied,0px));
 }
 body:has(#detail:not([hidden])){
  --small-tools-obstacle:calc(var(--small-detail-bottom) + var(--small-detail-occupied,0px));
 }
 body:has(#detail:not([hidden])):has(#boarding-announcement:not([hidden])){
  --small-tools-obstacle:calc(var(--small-detail-bottom) + var(--small-detail-occupied,0px) + 10px + var(--small-announcement-occupied,0px));
 }
 body[data-airport] #detail.detail:not([hidden]){
  left:14px;right:14px;top:auto;bottom:var(--small-detail-bottom);
  width:auto;max-width:none;padding:16px;z-index:8;background:var(--panel-solid,#172333);
  max-height:min(var(--small-detail-height),calc(100dvh - 100px - var(--small-detail-bottom)));
  overflow-x:hidden;overflow-y:auto;touch-action:pan-y;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;
 }
 .scene-tools{
  top:88px;padding:3px;
  /* Show every tool when it fits; leave 12px above the first bottom card. */
  max-height:max(36px,calc(100dvh - 100px - var(--small-tools-obstacle)));
  overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
  touch-action:pan-y;scrollbar-width:thin;
 }
 .scene-tools button{flex:none;width:30px;height:30px;font-size:18px}
 .scene-tools svg,.scene-tools .cta-icon{width:16px;height:16px}
 .scene-tools .tool-divider{flex:none;margin:3px 4px}
 .follow-status #stop-follow{position:relative;display:grid;place-items:center;flex:none;width:20px;height:20px;margin-left:auto;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
 .follow-status #stop-follow:before{content:'';position:absolute;inset:-12px}
 .boarding-announcement{
  --small-card-bottom:var(--operations-clearance,120px);
  bottom:var(--small-card-bottom);z-index:9;
  max-height:max(72px,calc(100dvh - 160px - var(--small-card-bottom)));
  overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
  touch-action:pan-y;-webkit-overflow-scrolling:touch;
 }
 body:has(#detail:not([hidden])) .boarding-announcement{
  --small-card-bottom:calc(var(--small-detail-bottom) + var(--small-detail-occupied,0px) + 10px);
 }
 /* Retain layout and follow state; closing details restores the bottom HUD. */
 body:has(#detail:not([hidden])) :is(#operations-bar,.scene-hud,.compass,#locate-me){visibility:hidden;pointer-events:none}
}
