/* The rules of the design files' <style> blocks, merged (apps/console/design/*.html), plus the console's menu popover. Everything else
   is inline style on the components, copied from the design. */
/* Colour tokens: every colour the console paints, named by its role, each light-dark(light, dark). The light values are the
   design's own colours; the dark ones follow the site's dark theme. Components name them through components/styles.ts, and the
   design fidelity test reads their light values from here. The page's color-scheme picks the value: the system's setting, or the
   theme Settings picked (<html data-theme>, src/lib/theme.ts). Brand artwork, providers' and connectors' own colours, and the
   always-dark panels (the runtime log, the selection bar, tooltips) keep literal colours. The series colours are the charts' categorical
   palette (components/TimeCharts.tsx): eight hues in a fixed order, each stepped for its theme, validated together for colour-vision
   deficiency against the surface of each. A sandbox's terminal (components/xterm.ts) takes the theme's tokens; its four neutrals, ANSI
   black and white and their bright pair, keep black dark and white light in either theme, each of them another token's value there. */
:root{color-scheme:light dark;
  --c-bg:light-dark(#FAFAF9,#0F0E0D);--c-surface:light-dark(#FFFFFF,#181715);--c-fill:light-dark(#F5F5F4,#22201E);
  --c-sidebar:light-dark(#F5F5F3,#141311);--c-track:light-dark(#EFEEEB,#2A2826);
  --c-line:light-dark(#E7E5E4,#2E2B29);--c-rule:light-dark(#F0EFEC,#252321);--c-line-strong:light-dark(#D6D3D1,#44403C);
  --c-ink:light-dark(#111111,#F2F1EF);--c-ink-strong:light-dark(#000000,#FFFFFF);--c-text-3:light-dark(#44403C,#D6D3D1);
  --c-subtle:light-dark(#57534E,#A8A29E);--c-muted:light-dark(#6B6B6B,#8A837D);--c-stone:light-dark(#78716C,#8A837D);
  --c-faint:light-dark(#A8A29E,#6B655F);--c-brand-ink:light-dark(#131210,#EDE9DE);--c-logo-edge:light-dark(#312C2A,#EDE9DE);
  --c-error:light-dark(#B91C1C,#F87171);--c-error-strong:light-dark(#DC2626,#EF4444);--c-error-bg:light-dark(#FEF2F2,#2A1414);
  --c-error-bg-soft:light-dark(#FFFBFB,#211212);--c-error-line:light-dark(#FCA5A5,#7F1D1D);
  --c-warn:light-dark(#92400E,#FBBF24);--c-warn-strong:light-dark(#B45309,#F59E0B);--c-warn-deep:light-dark(#78350F,#FCD34D);
  --c-warn-bg:light-dark(#FFFBEB,#2A2110);--c-warn-line:light-dark(#FCD34D,#78350F);
  --c-ok:light-dark(#166534,#4ADE80);--c-ok-strong:light-dark(#16A34A,#22C55E);--c-ok-bg:light-dark(#F0FDF4,#10241A);
  --c-info:light-dark(#1D4ED8,#60A5FA);--c-info-strong:light-dark(#2563EB,#3B82F6);--c-info-bg:light-dark(#EFF6FF,#111C2E);
  --c-violet:light-dark(#5B21B6,#C4B5FD);--c-violet-bg:light-dark(#F5F3FF,#1E1830);
  --c-series-1:light-dark(#2A78D6,#3987E5);--c-series-2:light-dark(#EB6834,#D95926);--c-series-3:light-dark(#1BAF7A,#199E70);
  --c-series-4:light-dark(#EDA100,#C98500);--c-series-5:light-dark(#E87BA4,#D55181);--c-series-6:light-dark(#008300,#008300);
  --c-series-7:light-dark(#6250D6,#9085E9);--c-series-8:light-dark(#E34948,#E66767);
  --c-focus-ring:light-dark(rgba(17,17,17,0.08),rgba(242,241,239,0.14));--c-header-bg:light-dark(rgba(250,250,249,0.86),rgba(15,14,13,0.86));
  --c-term-black:light-dark(var(--c-ink),var(--c-line-strong));--c-term-white:light-dark(var(--c-faint),var(--c-text-3));
  --c-term-bright-black:light-dark(var(--c-muted),var(--c-stone));--c-term-bright-white:light-dark(var(--c-line-strong),var(--c-ink))}
:root[data-theme="light"]{color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark}
body{margin:0;background:var(--c-bg)}
a{color:var(--c-ink);text-decoration:none}
a:hover{color:var(--c-ink-strong)}
.cnav:hover{background:var(--c-track);color:var(--c-ink)}
.btn-primary:hover{opacity:0.88}
.btn-ghost:hover{background:var(--c-fill);border-color:var(--c-faint)}
.btn-oauth:hover{background:var(--c-fill);border-color:var(--c-faint)}
.icon-btn:hover{background:var(--c-fill)}
.chip:hover{border-color:var(--c-faint)}
.text-link:hover{text-decoration:underline;text-underline-offset:3px}
.text-btn:hover{color:var(--c-ink-strong);text-decoration:underline;text-underline-offset:3px}
.bar:hover{background:var(--c-ink)}
.src:hover{border-color:var(--c-faint)}
label.src:has(input:checked){border-color:var(--c-ink) !important;box-shadow:0 0 0 1px var(--c-ink)}
.seg:hover{color:var(--c-ink)}
.page-tab:hover{color:var(--c-ink)}
/* The Files tab's folder list beside the file opened, one above the other where it is narrow. */
.file-browser{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr)}
.file-row:not([aria-current]):hover{background:var(--c-fill)!important}
@media (max-width:799px){.file-browser{grid-template-columns:minmax(0,1fr)}.file-browser>nav{border-right:0!important;border-bottom:1px solid var(--c-line)}}
.seg[aria-pressed="true"]{background:var(--c-surface);color:var(--c-ink);box-shadow:0 1px 2px rgba(0,0,0,0.08)}
.seg[aria-pressed="false"]{background:transparent;color:var(--c-subtle);box-shadow:none}
.field:focus{outline:none;border-color:var(--c-ink);box-shadow:0 0 0 3px var(--c-focus-ring)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
[hidden]{display:none !important}
.bgfield::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:url(assets/sandboxrouter-dotfield.png);background-size:1320px 1320px;background-repeat:repeat;background-position:center top;opacity:var(--bg-op,0.5)}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--c-ink);outline-offset:2px;border-radius:6px}
.bgfield a:focus-visible,.bgfield button:focus-visible{border-radius:8px}

/* Not in the design: disabled controls (and fields kept as typed while what they hold is checked, a provider's key), and the popover
   menus of the workspace switcher and row ••• buttons. */
button:disabled{opacity:0.5;cursor:default}
/* A submit under way (FormButtons) is disabled but keeps its full colour, so that the glass cube turning in it reads. */
button:disabled:has(.glass-cube-loader){opacity:1;cursor:progress}
.field:disabled,.field[readonly]{background:var(--c-fill) !important;color:var(--c-muted) !important}
.menu-anchor{position:relative;display:inline-block;width:0;height:0;vertical-align:bottom}
.menu-anchor-wide{display:block;width:auto;margin-top:-20px}
.menu{position:absolute;z-index:20;top:4px;right:0;min-width:160px;box-sizing:border-box;display:flex;flex-direction:column;padding:4px;background:var(--c-surface);border:1px solid var(--c-line);border-radius:12px;box-shadow:0 8px 24px rgba(17,17,17,0.12);text-align:left}
.menu-anchor-wide .menu{left:0;right:0}
.menu-item{height:32px;padding:0 10px;border:0;border-radius:8px;background:transparent;font-family:inherit;font-size:14px;color:var(--c-ink);text-align:left;white-space:nowrap;cursor:pointer}
.menu-item:hover{background:var(--c-fill)}
.menu-item[aria-current]{font-weight:600}
.menu-item-danger{color:var(--c-error)}
.list-row{cursor:pointer}
/* Not in the design: a long value never widens a table. A row's name and every value marked .truncate (an image, a tag) keep to
   one line and end in an ellipsis, whole on its own page or in its title; any other long text in a cell wraps between words, and
   splits a word only where it alone would overflow, so a number or an amount is never broken. */
td{overflow-wrap:break-word}
/* Shared copy controls: reserve their space, reveal on hover/focus, and crossfade the copy/check icons. */
.copy-value{--copy-button-size:24px;position:relative;display:block;box-sizing:border-box;min-width:0;padding-inline-end:30px}
.copy-value-text{display:block;min-width:0;overflow-wrap:anywhere}
.copy-value-truncate>.copy-value-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.copy-field{min-width:0;padding:10px 12px;border:1px solid var(--c-line);border-radius:8px;background:var(--c-bg)}
.copy-control{display:inline-flex;flex:none;vertical-align:middle}
.copy-value>.copy-control{--copy-y:-50%;position:absolute;inset-inline-end:0;top:50%}
.copy-button{position:relative;display:inline-grid;place-items:center;width:var(--copy-button-size,32px);height:var(--copy-button-size,32px);margin:0;padding:0;border:0;border-radius:6px;background:transparent;color:var(--copy-color,var(--c-subtle));cursor:pointer;transition:background-color 140ms ease,color 140ms ease}
.copy-button:hover{background:var(--c-fill)}
.copy-button:focus-visible{outline:2px solid var(--c-ink);outline-offset:2px}
.copy-button[aria-disabled="true"]{cursor:progress}
.copy-on-hover>.copy-control{opacity:0;pointer-events:none;transform:translate(2px,var(--copy-y,0));transition:opacity 160ms ease,transform 160ms cubic-bezier(.2,.8,.2,1)}
.copy-on-hover:hover>.copy-control,.copy-on-hover:focus-within>.copy-control,.copy-on-hover>.copy-control:not([data-copy-state="idle"]){opacity:1;pointer-events:auto;transform:translate(0,var(--copy-y,0))}
.copy-glyph{position:absolute;inset:0;display:grid;place-items:center;transition:opacity 160ms ease,transform 160ms cubic-bezier(.2,.8,.2,1)}
.copy-glyph-done{opacity:0;transform:scale(.8)}
.copy-control[data-copy-state="copied"] .copy-glyph-idle{opacity:0;transform:scale(.8)}
.copy-control[data-copy-state="copied"] .copy-glyph-done{opacity:1;transform:scale(1)}
.copy-control[data-copy-state="copied"] .copy-button{color:var(--copy-success,var(--c-ok))}
.copy-control[data-copy-state="error"] .copy-button{color:var(--c-error)}
.log-line{--copy-success:#8FD9A8}
@media(hover:none),(pointer:coarse){.copy-on-hover>.copy-control{opacity:1;pointer-events:auto;transform:translate(0,var(--copy-y,0))}}
@media(prefers-reduced-motion:reduce){.copy-on-hover>.copy-control,.copy-button,.copy-glyph{transition:none}}
/* Not in the design: a circled i (InfoTip) whose detail shows beside it on hover or keyboard focus, such as a meter's rate. */
.info-tip{position:relative;display:inline-flex;vertical-align:-2px;margin-left:6px;color:var(--c-faint);cursor:help;border-radius:50%}
.info-tip:hover,.info-tip:focus-visible{color:var(--c-text-3);outline:none}
.info-tip:hover::after,.info-tip:focus-visible::after{content:attr(data-tip);position:absolute;left:calc(100% + 8px);top:50%;transform:translateY(-50%);z-index:5;white-space:pre;padding:6px 10px;border-radius:6px;background:#1C1917;color:#FFFFFF;font-size:12px;font-weight:400;line-height:1.5;box-shadow:0 4px 12px rgba(0,0,0,.12)}
/* A wider circled i whose detail wraps under the line it sits on (the Usage rail's stop estimate), held by that line rather than the icon. */
.info-tip-wide{position:static}
.info-tip-wide:hover::after,.info-tip-wide:focus-visible::after{left:0;top:calc(100% + 6px);transform:none;white-space:normal;width:max-content;max-width:min(300px,100%)}
.list-row td .text-link,.truncate{display:inline-block;max-width:min(32ch,100%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
/* Sandbox rows stay on one line; long names and image references leave room for the other columns. */
section[aria-label="Sandboxes"] th,section[aria-label="Sandboxes"] td{white-space:nowrap}
section[aria-label="Sandboxes"] td .text-link{max-width:12ch}
section[aria-label="Sandboxes"] td .truncate{max-width:12ch}
.list-row:hover{background:var(--c-bg)}
.list-row[aria-selected]{background:var(--c-fill)}
/* A sandbox just created (docs/design/console-create-lands-on-list.md): green for a second, fading over two, once per row shown; decoration only, so none under reduced motion. */
.list-row-fresh{animation:list-row-fresh 3s ease-out}
@keyframes list-row-fresh{0%,33%{background:var(--c-ok-bg)}100%{background:transparent}}
@media (prefers-reduced-motion:reduce){.list-row-fresh{animation:none}}
/* A toast (components/Feedback.tsx Toast): bottom right, across the foot at phone width, lifted over the selection bar while that shows. */
.toast{position:fixed;z-index:45;right:24px;bottom:24px;width:min(380px,calc(100vw - 48px));animation:toast-in 160ms ease-out}
body:has(.selection-bar) .toast{bottom:88px}
@media (max-width:799px){.toast{left:16px;right:16px;bottom:16px;width:auto}body:has(.selection-bar) .toast{bottom:80px}}
@keyframes toast-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media (prefers-reduced-motion:reduce){.toast{animation:none}}
.toast .text-link:hover{color:#FFFFFF!important;text-decoration:underline;text-underline-offset:3px}
.toast-close:hover{background:rgba(255,255,255,0.12)!important;color:#FFFFFF!important}
.selection-action:hover{background:rgba(255,255,255,0.12)}
.selection-action-danger:hover{background:rgba(248,113,113,0.18)}
.selection-clear:hover{color:#FFFFFF!important}
.selection-bar{animation:selection-in 160ms ease-out}
@keyframes selection-in{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}
.menu-item-danger:hover{background:var(--c-error-bg)}
/* Not in the design: a field whose value is wrong, a label chip's remove button (screens/parts/Labels.tsx), and a field with a fixed
   prefix ($ before a variable). */
.field[aria-invalid="true"]{border-color:var(--c-error) !important}
.label-remove:hover{background:var(--c-line);color:var(--c-ink)}
/* A Sandboxes row's label chip, a button that searches for its label. */
.label-pick:hover{border-color:var(--c-faint)}
.affix:focus-within{border-color:var(--c-ink) !important;box-shadow:0 0 0 3px var(--c-focus-ring)}
.affix input:focus,.affix input:focus-visible{outline:none;box-shadow:none}
/* Not in the design: the workflow editor (components/CodeEditor.tsx), and a sandbox's terminal (screens/parts/Terminal.tsx), which
   takes the keyboard in xterm.js's hidden textarea, each a box of code (components/styles.ts CODE_BOX) outlined as a focused field while
   it has the focus. */
.code-editor:focus-within,.terminal-box:focus-within{border-color:var(--c-ink) !important;box-shadow:0 0 0 3px var(--c-focus-ring)}
.problem:hover{background:var(--c-error-bg) !important}
.step-link:hover{text-decoration:underline;text-underline-offset:3px}
/* Not in the design: tabs (components/Tabs.tsx), drawn as the sign-in screen's segmented control. */
.tab[aria-selected="true"]{background:var(--c-surface);color:var(--c-ink);box-shadow:0 1px 2px rgba(0,0,0,0.08)}
.tab[aria-selected="false"]{background:transparent;color:var(--c-subtle);box-shadow:none}
.tab[aria-selected="false"]:hover{color:var(--c-ink)}
/* Not in the design: the themed select (components/Select.tsx), a trigger like the inputs and a list like the menus. */
.select-trigger:hover{border-color:var(--c-faint)}
.select-trigger:focus-visible{outline:none}
.select-trigger[aria-expanded="true"]{border-color:var(--c-ink);box-shadow:0 0 0 3px var(--c-focus-ring)}
.select-list{z-index:30;right:auto;max-height:280px;overflow-y:auto;margin:0;list-style:none;font-family:'Geist', ui-sans-serif, system-ui, sans-serif}
.select-option{display:flex;align-items:center;justify-content:space-between;gap:16px;line-height:32px}
.select-option:hover{background:transparent}
.select-option[data-active]{background:var(--c-fill)}
.select-option[aria-selected="true"]{font-weight:500}
.select-option-rich{height:auto;padding:8px 10px;line-height:1.4;white-space:normal}
.select-option[aria-disabled="true"]{cursor:default;opacity:0.5}
/* The supplied glass cube loader: its first SVG frame is in the page shell, animated by boot.js before app.js loads. Its palette
   follows the page's theme as the colour tokens do, or the one a loader's own data-theme names (GlassCubeLoader's `theme`). */
.boot,.glass-cube-loader{--cube-bg:light-dark(#FDF7F0,#131210);--cube-edge:light-dark(#312C2A,#EDE9DE);--cube-ink:light-dark(#131210,#EDE9DE);--cube-arc:#E05A1E}
.glass-cube-loader[data-theme="light"]{color-scheme:light}
.glass-cube-loader[data-theme="dark"]{color-scheme:dark}
/* Inside a primary button (a busy submit), the cube is drawn in the button's own label colour, whichever theme fills the button. */
.btn-primary .glass-cube-loader{--cube-edge:currentColor;--cube-ink:currentColor}
.boot{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;background:var(--cube-bg);transition:opacity 300ms ease}
.boot[data-done]{opacity:0;pointer-events:none}
.glass-cube-loader{display:inline-flex;flex:none;vertical-align:middle}
.glass-cube-loader svg{display:block}
.glass-cube-loader [data-cube-hidden],.glass-cube-loader [data-cube-solid]{stroke:var(--cube-edge)}
.glass-cube-loader [data-cube-ticks],.glass-cube-loader [data-cube-dot]{fill:var(--cube-ink)}
.glass-cube-loader [data-cube-arc]{stroke:var(--cube-arc)}
@media(prefers-reduced-motion:reduce){.boot{transition:none}}
/* Not in the design: loading skeletons (components/Skeleton.tsx), grey placeholders in a page's own layout while its data loads.
   They ease between full and faint, and hold still for reduced motion. */
.skeleton{background:var(--c-line);animation:skeleton-pulse 1.6s cubic-bezier(0.37,0,0.63,1) infinite alternate}
@keyframes skeleton-pulse{from{opacity:1}to{opacity:0.5}}
@media (prefers-reduced-motion:reduce){.skeleton{animation:none}}
/* Not in the design: a provider's logo (screens/parts/ProviderPicker.tsx) is its own mark, drawn for a light page; in dark it sits on
   a white tile, drawn around it so that it keeps its size. */
.provider-logo{border-radius:5px;background:light-dark(transparent,#FFFFFF);box-shadow:0 0 0 2px light-dark(transparent,#FFFFFF)}
/* Not in the design: a status's mark (components/Status.tsx) keeps its size beside a label of any length, grows in as it changes kind,
   as an operation's turning glass cube takes the dot's place and the dot comes back, and eases from one tone's colour to the next.
   Still for reduced motion. */
.status-mark{flex:none;animation:status-in 240ms cubic-bezier(0.22,1,0.36,1) both;transition:background-color 240ms ease,border-color 240ms ease}
@keyframes status-in{from{opacity:0;transform:scale(0.4)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.status-mark{animation:none;transition:none}}
/* Not in the design: on desktop, where the sidebar sits beside the page (the shell wraps it above the page below about 800px),
   it stays in view at full window height while the page scrolls. It only scrolls itself on a window too short to fit it. */
@media (min-width:800px){.shell-sidebar{position:sticky;top:0;align-self:flex-start;height:100vh;height:100dvh;overflow-y:auto}}
/* Not in the design: on a phone the sidebar is a bar across the top that stays in view, its links folded behind a menu button
   (components/Shell.tsx); open, it scrolls itself on a window too short to fit it. */
@media (max-width:799px){div:has(>.shell-sidebar){flex-direction:column;flex-wrap:nowrap!important}.shell-sidebar{flex:none!important;position:sticky;top:0;z-index:25;max-height:100vh;max-height:100dvh;overflow-y:auto;padding:8px 12px!important;border-right:0!important;border-bottom:1px solid var(--c-line)}}

/* The inline glass cube mark keeps its aspect ratio (its viewBox) and clear space at navigation sizes. */
.brand-lockup{display:inline-flex;align-items:center;gap:10px;white-space:nowrap;color:var(--c-brand-ink);font-family:Geist,sans-serif;font-size:20px;font-weight:700;letter-spacing:-.035em;line-height:1.2}
.brand-lockup svg{display:block;flex-shrink:0}
.brand-router{font-weight:400;color:var(--c-stone)}
.brand-mark{flex-shrink:0}

/* Not in the design: the admin console's charts (components/TimeCharts.tsx). A plot takes the keyboard's focus for its readout, a
   chart's table view opens under it, and the hovered day's band is washed. */
.chart-plot:focus-visible{outline:2px solid var(--c-ink);outline-offset:4px;border-radius:6px}
.chart-table>summary{width:max-content;cursor:pointer;font-size:12px;color:var(--c-subtle)}
.chart-table>summary:hover{color:var(--c-ink)}

/* Not in the design: Usage & billing, layout C (screens/UsageScreen.tsx). The money rail sits right of the usage and stays in view while
   they are side by side and it fits the window's height; wrapped (narrower), it comes first, as the row runs in reverse. A month chart's day shows its figure on hover
   or keyboard focus. At phone width the tiles are two (Today so far goes), and details marked .hide-phone go. */
.usage-cols{display:flex;flex-direction:row-reverse;flex-wrap:wrap;gap:20px;align-items:flex-start}
.usage-rail{flex:1 1 320px;max-width:100%;min-width:0;display:flex;flex-direction:column;gap:16px}
.usage-left{flex:999 1 520px;min-width:0;display:flex;flex-direction:column;gap:16px}
@media (min-width:1180px) and (min-height:900px){.usage-rail{position:sticky;top:24px}}
section[aria-labelledby="where-h"] td{white-space:nowrap}
.usage-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.month-bar{outline:none}
.month-tip{display:none;position:absolute;top:-30px;left:50%;transform:translateX(-50%);z-index:3;white-space:nowrap;padding:3px 8px;border-radius:6px;background:#1C1917;color:#FFFFFF;font-size:12px}
.month-bar-start .month-tip{left:0;transform:none}
.month-bar-end .month-tip{left:auto;right:0;transform:none}
.month-bar:hover .month-tip,.month-bar:focus .month-tip{display:block}
.month-bar:hover .month-fill,.month-bar:focus .month-fill{filter:brightness(.9)}
.month-bar:focus-visible .month-fill{outline:2px solid var(--c-ink);outline-offset:1px}
@media (max-width:799px){.usage-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.hide-phone{display:none!important}.month-chart{height:110px!important}}

/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */

/**
 *  Default styles for xterm.js
 */

.xterm {
    cursor: text;
    position: relative;
    user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
}

.xterm.focus,
.xterm:focus {
    outline: none;
}

.xterm .xterm-helpers {
    position: absolute;
    top: 0;
    /**
     * The z-index of the helpers must be higher than the canvases in order for
     * IMEs to appear on top.
     */
    z-index: 5;
}

.xterm .xterm-helper-textarea {
    padding: 0;
    border: 0;
    margin: 0;
    /* Move textarea out of the screen to the far left, so that the cursor is not visible */
    position: absolute;
    opacity: 0;
    left: -9999em;
    top: 0;
    width: 0;
    height: 0;
    z-index: -5;
    /** Prevent wrapping so the IME appears against the textarea at the correct position */
    white-space: nowrap;
    overflow: hidden;
    resize: none;
}

.xterm .composition-view {
    /* TODO: Composition position got messed up somewhere */
    background: #000;
    color: #FFF;
    display: none;
    position: absolute;
    white-space: nowrap;
    z-index: 1;
}

.xterm .composition-view.active {
    display: block;
}

.xterm .xterm-viewport {
    /* On OS X this is required in order for the scroll bar to appear fully opaque */
    background-color: #000;
    overflow-y: scroll;
    cursor: default;
    position: absolute;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
}

.xterm .xterm-screen {
    position: relative;
}

.xterm .xterm-screen canvas {
    position: absolute;
    left: 0;
    top: 0;
}

.xterm-char-measure-element {
    display: inline-block;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: -9999em;
    line-height: normal;
}

.xterm.enable-mouse-events {
    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
    cursor: default;
}

.xterm.xterm-cursor-pointer,
.xterm .xterm-cursor-pointer {
    cursor: pointer;
}

.xterm.column-select.focus {
    /* Column selection mode */
    cursor: crosshair;
}

.xterm .xterm-accessibility:not(.debug),
.xterm .xterm-message {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 10;
    color: transparent;
    pointer-events: none;
}

.xterm .xterm-accessibility-tree:not(.debug) *::selection {
  color: transparent;
}

.xterm .xterm-accessibility-tree {
  font-family: monospace;
  user-select: text;
  white-space: pre;
}

.xterm .xterm-accessibility-tree > div {
  transform-origin: left;
  width: fit-content;
}

.xterm .live-region {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.xterm-dim {
    /* Dim should not apply to background, so the opacity of the foreground color is applied
     * explicitly in the generated class and reset to 1 here */
    opacity: 1 !important;
}

.xterm-underline-1 { text-decoration: underline; }
.xterm-underline-2 { text-decoration: double underline; }
.xterm-underline-3 { text-decoration: wavy underline; }
.xterm-underline-4 { text-decoration: dotted underline; }
.xterm-underline-5 { text-decoration: dashed underline; }

.xterm-overline {
    text-decoration: overline;
}

.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }
.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }
.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }
.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }
.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }

.xterm-strikethrough {
    text-decoration: line-through;
}

.xterm-screen .xterm-decoration-container .xterm-decoration {
	z-index: 6;
	position: absolute;
}

.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
	z-index: 7;
}

.xterm-decoration-overview-ruler {
    z-index: 8;
    position: absolute;
    top: 0;
    right: 0;
    pointer-events: none;
}

.xterm-decoration-top {
    z-index: 2;
    position: relative;
}



/* Derived from vs/base/browser/ui/scrollbar/media/scrollbar.css */

/* xterm.js customization: Override xterm's cursor style */
.xterm .xterm-scrollable-element > .scrollbar {
    cursor: default;
}

/* Arrows */
.xterm .xterm-scrollable-element > .scrollbar > .scra {
	cursor: pointer;
	font-size: 11px !important;
}

.xterm .xterm-scrollable-element > .visible {
	opacity: 1;

	/* Background rule added for IE9 - to allow clicks on dom node */
	background:rgba(0,0,0,0);

	transition: opacity 100ms linear;
	/* In front of peek view */
	z-index: 11;
}
.xterm .xterm-scrollable-element > .invisible {
	opacity: 0;
	pointer-events: none;
}
.xterm .xterm-scrollable-element > .invisible.fade {
	transition: opacity 800ms linear;
}

/* Scrollable Content Inset Shadow */
.xterm .xterm-scrollable-element > .shadow {
	position: absolute;
	display: none;
}
.xterm .xterm-scrollable-element > .shadow.top {
	display: block;
	top: 0;
	left: 3px;
	height: 3px;
	width: 100%;
	box-shadow: var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.left {
	display: block;
	top: 3px;
	left: 0;
	height: 100%;
	width: 3px;
	box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.top-left-corner {
	display: block;
	top: 0;
	left: 0;
	height: 3px;
	width: 3px;
}
.xterm .xterm-scrollable-element > .shadow.top.left {
	box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}
