/* terminal.css — xterm container + backgrounds + scrollbars */

/* Wrapper around #terminal that xterm mounts into */
.terminal-pane {
  height: 100%;
  overflow: hidden;   /* hide outer scrollbar */
  position: relative;
}

/* Background presets for terminal */
#terminal.bg-net  { background-image: url("/sn/images/net.png");  }
#terminal.bg-grid { background-image: url("/sn/images/grid.png"); }
#terminal.bg-star { background-image: url("/sn/images/stars.png"); }

#terminal {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow: hidden;
}

/* Dim overlay above background, below terminal layer */
#terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* Ensure terminal chrome is transparent over background */
#terminal .xterm {
  position: relative;
  z-index: 2;
  background: transparent !important;
  font-family: "OCRA", monospace;
}
#terminal .xterm-screen,
#terminal .xterm-viewport,
#terminal .xterm-rows {
  background-color: transparent !important;
}

/* ── Scrollbar styling (WebKit) */
.xterm-viewport::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.xterm-viewport::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
}
.xterm-viewport::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}
.xterm-viewport::-webkit-scrollbar-thumb:hover {
  background: #666;
}

/* ── Firefox scrollbar */
.xterm-viewport {
  scrollbar-width: thin;
  scrollbar-color: #444 rgba(0,0,0,0.25);
}

/* Mobile: momentum scroll + touch passthrough on overlay */
@media (pointer:coarse){
  #terminal .xterm-viewport{
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y;
  }
  #terminal::before{ pointer-events:none; }
  #terminal .xterm{  touch-action:pan-y; }
}

