/* Terminal in emulator mode (xterm.js, vendor/xterm): a real PTY inside the Breckly terminal frame. The bar, find strip,
   reconnecting strip and end card are remote.css's; only the screen is xterm's. Colours come from the frame (remote.css). */
.term-screen {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
}
/* The padding sits on xterm's own element: the fit addon subtracts it, whereas a padded parent made it count one row too many. */
.term-screen .xterm { padding: 8px 4px 6px 12px; }
.term-screen.fixed { overflow: auto; }
.term-screen .xterm { height: 100%; }
.term-screen.fixed .xterm { height: auto; }
.term-screen .xterm-viewport { background-color: transparent !important; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
.term-screen .xterm-viewport::-webkit-scrollbar { width: 9px; }
.term-screen .xterm-viewport::-webkit-scrollbar-thumb { border-radius: 9px; background: rgba(255, 255, 255, 0.16); border: 2px solid transparent; background-clip: padding-box; }
.term-screen .xterm .xterm-helper-textarea { caret-color: transparent; }
.term-screen .xterm a, .term-screen .xterm .xterm-underline-5 { text-decoration-color: #7FB0FF; }
.term[data-state="ended"] .term-screen, .term[data-state="reconnecting"] .term-screen { opacity: 0.55; }
.term[data-state="replay"] .term-screen .xterm-cursor-layer, .term[data-state="watching"] .term-screen .xterm-cursor-layer { display: none; }
.term-screen:focus-within { box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--p-accent-dk) 70%, transparent); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.term-loading { display: flex; padding: 10px 14px 0; align-items: center; gap: 8px; color: #8C97B5; font: italic var(--term-size) / 1.55 var(--font-data); }
/* Where the page scrolls instead of fitting (narrow or short screens), the emulator still needs a height to fit rows into. */
@media (max-width: 860px), (max-height: 559px) {
  .rc-main > .term:has(> .term-screen:not(.fixed)) { height: calc(var(--view-h, 100dvh) - var(--top-h) - 120px); min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) { .term-screen .xterm-cursor { animation: none !important; } }
