/**
 * 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;
}

.toast-title {
  font-weight: bold;
}
.toast-message {
  -ms-word-wrap: break-word;
  word-wrap: break-word;
}
.toast-message a,
.toast-message label {
  color: #FFFFFF;
}
.toast-message a:hover {
  color: #CCCCCC;
  text-decoration: none;
}
.toast-close-button {
  position: relative;
  right: -0.3em;
  top: -0.3em;
  float: right;
  font-size: 20px;
  font-weight: bold;
  color: #FFFFFF;
  -webkit-text-shadow: 0 1px 0 #ffffff;
  text-shadow: 0 1px 0 #ffffff;
  opacity: 0.8;
  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
  filter: alpha(opacity=80);
  line-height: 1;
}
.toast-close-button:hover,
.toast-close-button:focus {
  color: #000000;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.4;
  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
  filter: alpha(opacity=40);
}
.rtl .toast-close-button {
  left: -0.3em;
  float: left;
  right: 0.3em;
}
/*Additional properties for button version
 iOS requires the button element instead of an anchor tag.
 If you want the anchor version, it requires `href="#"`.*/
button.toast-close-button {
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
  -webkit-appearance: none;
}
.toast-top-center {
  top: 0;
  right: 0;
  width: 100%;
}
.toast-bottom-center {
  bottom: 0;
  right: 0;
  width: 100%;
}
.toast-top-full-width {
  top: 0;
  right: 0;
  width: 100%;
}
.toast-bottom-full-width {
  bottom: 0;
  right: 0;
  width: 100%;
}
.toast-top-left {
  top: 12px;
  left: 12px;
}
.toast-top-right {
  top: 12px;
  right: 12px;
}
.toast-bottom-right {
  right: 12px;
  bottom: 12px;
}
.toast-bottom-left {
  bottom: 12px;
  left: 12px;
}
#toast-container {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
  /*overrides*/
}
#toast-container * {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
#toast-container > div {
  position: relative;
  pointer-events: auto;
  overflow: hidden;
  margin: 0 0 6px;
  padding: 15px 15px 15px 50px;
  width: 300px;
  -moz-border-radius: 3px 3px 3px 3px;
  -webkit-border-radius: 3px 3px 3px 3px;
  border-radius: 3px 3px 3px 3px;
  background-position: 15px center;
  background-repeat: no-repeat;
  -moz-box-shadow: 0 0 12px #999999;
  -webkit-box-shadow: 0 0 12px #999999;
  box-shadow: 0 0 12px #999999;
  color: #FFFFFF;
  opacity: 0.8;
  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
  filter: alpha(opacity=80);
}
#toast-container > div.rtl {
  direction: rtl;
  padding: 15px 50px 15px 15px;
  background-position: right 15px center;
}
#toast-container > div:hover {
  -moz-box-shadow: 0 0 12px #000000;
  -webkit-box-shadow: 0 0 12px #000000;
  box-shadow: 0 0 12px #000000;
  opacity: 1;
  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
  filter: alpha(opacity=100);
  cursor: pointer;
}
#toast-container > .toast-info {
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important;
}
#toast-container > .toast-error {
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important;
}
#toast-container > .toast-success {
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important;
}
#toast-container > .toast-warning {
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important;
}
#toast-container.toast-top-center > div,
#toast-container.toast-bottom-center > div {
  width: 300px;
  margin-left: auto;
  margin-right: auto;
}
#toast-container.toast-top-full-width > div,
#toast-container.toast-bottom-full-width > div {
  width: 96%;
  margin-left: auto;
  margin-right: auto;
}
.toast {
  background-color: #030303;
}
.toast-success {
  background-color: #51A351;
}
.toast-error {
  background-color: #BD362F;
}
.toast-info {
  background-color: #2F96B4;
}
.toast-warning {
  background-color: #F89406;
}
.toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  background-color: #000000;
  opacity: 0.4;
  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
  filter: alpha(opacity=40);
}
/*Responsive Design*/
@media all and (max-width: 240px) {
  #toast-container > div {
    padding: 8px 8px 8px 50px;
    width: 11em;
  }
  #toast-container > div.rtl {
    padding: 8px 50px 8px 8px;
  }
  #toast-container .toast-close-button {
    right: -0.2em;
    top: -0.2em;
  }
  #toast-container .rtl .toast-close-button {
    left: -0.2em;
    right: 0.2em;
  }
}
@media all and (min-width: 241px) and (max-width: 480px) {
  #toast-container > div {
    padding: 8px 8px 8px 50px;
    width: 18em;
  }
  #toast-container > div.rtl {
    padding: 8px 50px 8px 8px;
  }
  #toast-container .toast-close-button {
    right: -0.2em;
    top: -0.2em;
  }
  #toast-container .rtl .toast-close-button {
    left: -0.2em;
    right: 0.2em;
  }
}
@media all and (min-width: 481px) and (max-width: 768px) {
  #toast-container > div {
    padding: 15px 15px 15px 50px;
    width: 25em;
  }
  #toast-container > div.rtl {
    padding: 15px 50px 15px 15px;
  }
}

/*!
 * "Fork me on GitHub" CSS ribbon v0.2.3 | MIT License
 * https://github.com/simonwhitaker/github-fork-ribbon-css
*/

.github-fork-ribbon {
  width: 12.1em;
  height: 12.1em;
  position: absolute;
  overflow: hidden;
  top: 0;
  right: 0;
  z-index: 9999;
  pointer-events: none;
  font-size: 13px;
  text-decoration: none;
  text-indent: -999999px;
}

.github-fork-ribbon.fixed {
  position: fixed;
}

.github-fork-ribbon:hover, .github-fork-ribbon:active {
  background-color: rgba(0, 0, 0, 0.0);
}

.github-fork-ribbon:before, .github-fork-ribbon:after {
  /* The right and left classes determine the side we attach our banner to */
  position: absolute;
  display: block;
  width: 15.38em;
  height: 1.54em;

  top: 3.23em;
  right: -3.23em;

  -webkit-box-sizing: content-box;
  -moz-box-sizing: content-box;
  box-sizing: content-box;

  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
}

.github-fork-ribbon:before {
  content: "";

  /* Add a bit of padding to give some substance outside the "stitching" */
  padding: .38em 0;

  /* Set the base colour */
  background-color: #a00;

  /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */
  background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.15)));
  background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
  background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
  background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
  background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));

  /* Add a drop shadow */
  -webkit-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
  -moz-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
  box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);

  pointer-events: auto;
}

.github-fork-ribbon:after {
  /* Set the text from the data-ribbon attribute */
  content: attr(data-ribbon);

  /* Set the text properties */
  color: #fff;
  font: 700 1em "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.54em;
  text-decoration: none;
  text-shadow: 0 -.08em rgba(0, 0, 0, 0.5);
  text-align: center;
  text-indent: 0;

  /* Set the layout properties */
  padding: .15em 0;
  margin: .15em 0;

  /* Add "stitching" effect */
  border-width: .08em 0;
  border-style: dotted;
  border-color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.github-fork-ribbon.left-top, .github-fork-ribbon.left-bottom {
  right: auto;
  left: 0;
}

.github-fork-ribbon.left-bottom, .github-fork-ribbon.right-bottom {
  top: auto;
  bottom: 0;
}

.github-fork-ribbon.left-top:before, .github-fork-ribbon.left-top:after, .github-fork-ribbon.left-bottom:before, .github-fork-ribbon.left-bottom:after {
  right: auto;
  left: -3.23em;
}

.github-fork-ribbon.left-bottom:before, .github-fork-ribbon.left-bottom:after, .github-fork-ribbon.right-bottom:before, .github-fork-ribbon.right-bottom:after {
  top: auto;
  bottom: 3.23em;
}

.github-fork-ribbon.left-top:before, .github-fork-ribbon.left-top:after, .github-fork-ribbon.right-bottom:before, .github-fork-ribbon.right-bottom:after {
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

/*
 * SPDX-FileCopyrightText: 2024 Volodymyr Shymanskyy
 * SPDX-License-Identifier: MIT
 *
 * The software is provided "as is", without any warranties or guarantees (explicit or implied).
 * This includes no assurances about being fit for any specific purpose.
 */

:root {
    --fg-color: #cccccc;
    --fg-color-highlight: #4fc1ff;
    --accent-color: #007acc;
    --bg-color: #1e1e1e;
    --bg-color-menu: #252526;
    --bg-color-edit: #1e1e1e;
    --font-size: 14px;
    --connected-passive: #4ec9b0;
    --connected-active: #007acc;
    --connected-color: var(--connected-passive);
    --animation: 0.3s ease-in-out;
}

/*
 * Sensible defaults
 */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overscroll-behavior: none;
    box-sizing: border-box;
    background: var(--bg-color);
    color: var(--fg-color);
    font-family: system-ui;
    font-weight: normal;
    font-size: var(--font-size);
    transition: font-size var(--animation),
                background-color var(--animation),
                color var(--animation),
                opacity var(--animation);
}

/* Only the IDE takes over scrolling and gestures wholesale. The standalone
   pages (bridge, benchmark) are ordinary documents and must stay pannable. */
body#app {
    touch-action: none;
}

*, *:before, *:after {
    box-sizing: inherit;
}

*     { margin: 0; }
p, hr { margin: revert; }

@media (prefers-reduced-motion: reduce) {
    :root { --animation: 1ms linear; }
    *, *:before, *:after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }
}

/* Firefox has no ::-webkit-scrollbar, so it needs the standard properties to
   get anything close to the flat scrollbars below. This must stay guarded:
   Chromium 121+ supports scrollbar-width/-color and drops every
   ::-webkit-scrollbar rule as soon as either is set to a non-auto value. */
@supports not selector(::-webkit-scrollbar) {
    html {
        scrollbar-width: thin;
        scrollbar-color: hsla(0, 0%, 60%, .8) transparent;
    }
}

::-webkit-scrollbar {
    height: .5rem;
    width:  .5rem;
}

::-webkit-scrollbar-track {
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: hsla(0, 0%, 60%, .8);
}

::-webkit-scrollbar-corner {
    background-color: transparent;
}

/* Nothing here draws a default focus ring (buttons and links are unstyled),
   so keyboard navigation needs an explicit one. */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 1px;
}

a {
    color: unset;
    text-decoration: none;
}

a.link {
    font-weight: 600;
    text-decoration: underline dotted 1px;
    text-underline-offset: 0.2rem;
    -webkit-text-decoration: underline dotted 1px;
}

/* A link that was deliberately not made clickable (a package readme). It still
   reads as a link and names its target on hover, but it goes nowhere. */
.link-dead {
    cursor: default;
}

label {
    user-select: none;
    cursor: pointer;
}

input[type="checkbox" i] {
    /* Sized in em so the checkbox tracks the zoom setting like everything else */
    width: 1em;
    height: 1em;
    margin: 0 3px 0 0;
    vertical-align: -0.1em;
    cursor: pointer;
}

button {
    padding: 5px 5px;
    background: none;
    border: none;
    color: unset;
    cursor: pointer;
    font-size: 1.3rem;
}

button.connected {
    color: var(--connected-color);
}

/* The device dropped and is being waited for. It keeps the colour of a connection
   because the session is not over yet - the board is expected back. */
button.reconnecting {
    color: var(--connected-color);
    animation: reconnecting-pulse 1.2s ease-in-out infinite;
}

@keyframes reconnecting-pulse {
    50% { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
    button.reconnecting {
        animation: none;
        opacity: 0.6;
    }
}

/* Buttons here draw neither background nor border, so being disabled would not
   show at all otherwise */
button:disabled {
    opacity: 0.4;
    cursor: default;
}

/*
 * Inactive panels should feel visually detached from the active UI, while still
 * keeping their content readable.
 *
 * Only opacities change, and both of them are declared on either side of the
 * switch: a pseudo-element that comes and goes along with the selector has nothing
 * to fade, and a property that exists in one state only cannot be transitioned
 * back. The stacking context is set up here rather than with the state, so
 * becoming inert does not rebuild it mid-transition.
 */
#menu-files,
#menu-pkg,
#menu-tools {
    position: relative;
    isolation: isolate;
    opacity: 1;
    transition: opacity var(--animation);
}

#menu-files::before,
#menu-pkg::before,
#menu-tools::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity var(--animation);
    background-image: repeating-linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0,
        rgba(255, 255, 255, 0.08) 8px,
        transparent 8px,
        transparent 16px
    );
    background-size: 100% 100%;
    background-repeat: no-repeat;
    mix-blend-mode: screen;
}

/* The hatching is painted behind the content it covers */
#menu-files > *,
#menu-pkg > *,
#menu-tools > * {
    position: relative;
    z-index: 1;
}

:is(#menu-files, #menu-pkg, #menu-tools):is([inert], .inert) {
    opacity: 0.4;
}

:is(#menu-files, #menu-pkg, #menu-tools):is([inert], .inert)::before {
    opacity: 1;
}

select {
    border: none;
}

input, select, option {
    font: unset;
    color: unset;
    background-color: unset;
}

option {
    background-color: var(--bg-color);
}

/*
 * UI Helpers
 */

.windows {
    font-family: Segoe WPC,Segoe UI,sans-serif;
}

.macos {
    font-family: -apple-system,BlinkMacSystemFont,sans-serif;
}

.linux {
    font-family: system-ui,Ubuntu,Droid Sans,sans-serif;
}

.fa-power-off { color: #ffcc4d; }
.fa-bug { color: #ffcc4d; }
.fa-download { color: #4ec9b0; }
.fa-circle-play { color: #3794ff; }
.fa-circle-stop { color: #ff7272; }
.fa-circle-info { color: #3794ff; }
.fa-file { color: #3794ff; }
.fa-file-circle-exclamation { color: #ed4337; }
.fa-folder, .fa-folder-open { color: #ffcc4d; }
.fa-certificate { color: #ba0311; }
.fa-cube { color: #ba9066; }
.fa-cubes { color: #ba9066; }
.fa-gauge-high { color: #4ec9b0; }
.fa-tools { color: #ccd6dd; }
/*.fa-arrows-rotate { color: #3b88c3; }*/
.fa-sliders { color: #ccd6dd }
.fa-trash-can { color: #ccd6dd }
.fa-star { color: #ffcc4d; }

.highlight {
    background: var(--bg-color-edit);
    border-radius: 3px;
    padding: 3px 5px 3px 5px;
    line-height: 1.35;
    white-space: nowrap;
}

.hidden {
    display: none;
}

.space-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.monospace {
    font-family: ui-monospace, "Droid Sans Mono", "Cascadia Mono", Consolas, Menlo, monospace;
    font-weight: normal;
    white-space: pre;
    font-size: 0.9rem;
    line-height: 1.35;
}

/* Title-lines */

.title-lines {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-align: center;
}

.title-lines:before, .title-lines:after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background-color: #cccccc88;
}

/* Tabs */

.tabs {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    user-select: none;
    font-size: 1.1rem;
}

.tab {
    /* inline-flex, not inline: an inline box ignores the vertical padding,
       which let the active background bleed out of the line box. The gap
       stands in for the markup whitespace that flex layout drops. */
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 5px 10px;
}

.tab.active {
    background: var(--bg-color-edit);
    box-shadow: inset 0 2px 0 var(--accent-color);
}

.tab-content {
    display: none;
    flex: 1;
    padding: 5px 0px 5px 5px;
}

.tab-content.active {
    display: block;
}

/*
 * Standalone pages (bridge, benchmark)
 */

body.page {
    height: auto;
    min-height: 100%;
    padding: 20px;
    line-height: 1.8;
}

body.page h1 {
    font-size: 1.5em;
}

/* Keeps buttons and checkboxes on one baseline where they sit inline in a
   sentence, and lets them wrap as a unit on narrow screens. The gaps stand in
   for the markup whitespace that flex layout drops. */
.button-row, .check-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    vertical-align: middle;
}

.button-row {
    gap: 0 4px;
}

.check-row {
    gap: 0 1em;
}

/*
 * SPDX-FileCopyrightText: 2024 Volodymyr Shymanskyy
 * SPDX-License-Identifier: MIT
 *
 * The software is provided "as is", without any warranties or guarantees (explicit or implied).
 * This includes no assurances about being fit for any specific purpose.
 */

:root {
    --side-menu-width: 300px;
}

body {
    display: flex;
    flex-direction: column;
    opacity: 0;
}

body.loaded {
    opacity: 1;
}

.github-fork-ribbon:before {
    background-color: #666;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: normal;
}

#tool-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    padding: 1px 1px 0px 1px;
    user-select: none;
}

#container {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

#side-menu {
    flex: 0 0 var(--side-menu-width);
    display: flex;
    flex-direction: column-reverse;
    background-color: var(--bg-color-menu);
    /* The active tab-content is the scroller; the menu itself must not scroll,
       otherwise the tab strip drifts out of view. */
    overflow: hidden;
    transition: margin-left var(--animation),
                left var(--animation);
    user-select: none;
}

#side-menu.hidden {
    margin-left: calc(-1 * var(--side-menu-width));
}

#main-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.editor {
    background: var(--bg-color-edit);
    height: 100%;
}

#editor-tabs {
    flex: 0 0 auto;
    justify-content: flex-start;
    padding: 0px 1px 0px 0px;
    overflow-x: auto;
    overflow-y: hidden;
}

#editor-tabs .tab {
    flex: 0 0 auto;
    cursor: pointer;
    padding: 2px 10px;
}

/* The unsaved marker is set on the tab for new files and on the title for
   edited ones; both have to render. */
#editor-tabs .tab.changed .tab-title::after,
#editor-tabs .tab .tab-title.changed::after {
    content: " ●";
    color: var(--fg-color-highlight);
}

/* Changed on the device under unsaved edits - takes precedence over the plain
   unsaved marker, since this is the one that needs a decision. */
#editor-tabs .tab .tab-title.conflict::after {
    content: " ▲";
    color: var(--fg-color-highlight);
}

#editor-tabs .menu-action {
    font-size: 0.9rem;
}

#editor-tabs .tab-title {
    pointer-events: none;
    text-wrap: nowrap;
}

#toast-container.toast-top-right {
    top: 2.75rem;
}

#toast-container > div {
    border-radius: 0px;
    -webkit-border-radius: 0px;
    opacity: 0.95;
    box-shadow: none;
    -webkit-box-shadow: none;
}

.editor-tab-pane {
    display: none;
}

.editor-tab-pane.active {
    display: block;
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.editor-tab-pane.active .editor {
    overflow: auto;
}

#terminal-container {
    height: 200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: content-box;
}

#terminal-tabs {
    flex: 0 0 auto;
    cursor: row-resize;
    padding: 2px 1px 0px 0px;
    background: var(--bg-color);
}

#menu-tabs {
    flex: 0 0 auto;
    padding: 5px 0;
}

#menu-about {
    position: relative;
}

#side-menu .tab-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 10px;
}

#xterm {
    height: 0px;
    background: var(--bg-color-edit);
}

.marked-viewer {
    min-height: 100%;
    width: 100%;
    max-width: 920px;
    /* margin: 0 auto; */
    padding: 20px;
    color: var(--fg-color);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.marked-viewer > :first-child {
    margin-top: 0;
}

.marked-viewer > :last-child {
    margin-bottom: 0;
}

.marked-viewer h1,
.marked-viewer h2,
.marked-viewer h3,
.marked-viewer h4,
.marked-viewer h5,
.marked-viewer h6 {
    line-height: 1.25;
    margin: 1.5em 0 0.55em;
}

.marked-viewer h1 {
    font-size: 1.75rem;
    padding-bottom: 0.25em;
    border-bottom: 1px solid #ffffff20;
}

.marked-viewer h2 {
    font-size: 1.35rem;
    padding-bottom: 0.2em;
    border-bottom: 1px solid #ffffff18;
}

.marked-viewer h3 {
    font-size: 1.1rem;
}

.marked-viewer p,
.marked-viewer ul,
.marked-viewer ol,
.marked-viewer blockquote,
.marked-viewer pre,
.marked-viewer table {
    margin: 0.8em 0;
}

.marked-viewer ul,
.marked-viewer ol {
    padding-left: 1.5em;
}

.marked-viewer li + li {
    margin-top: 0.25em;
}

.marked-viewer blockquote {
    padding: 0 0 0 1em;
    border-left: 2px solid var(--accent-color);
    color: #ffffffc8;
}

.marked-viewer code {
    padding: 0.1em 0.3em;
    border-radius: 3px;
    background: #ffffff12;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
}

.marked-viewer pre {
    max-width: 100%;
    padding: 0.85em 1em;
    border: 1px solid #ffffff16;
    border-radius: 4px;
    background: #00000028;
    overflow: auto;
}

.marked-viewer pre code {
    display: block;
    padding: 0;
    background: none;
    white-space: pre;
}

/*.marked-viewer img {
    max-width: 100%;
    height: auto;
}*/

.marked-viewer table {
    display: block;
    max-width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
}

.marked-viewer th,
.marked-viewer td {
    padding: 0.4em 0.65em;
    border: 1px solid #ffffff20;
}

.marked-viewer th {
    background: #ffffff0d;
}

.hexed-viewer {
}
.hexed-line {
    display: flex;
}
.hexed-address, .hexed-hex-part, .hexed-ascii-part {
    padding: 0 8px;
}
.hexed-address {
    font-weight: 300;
    border-right: 1px solid var(--bg-color);
}
.hexed-hex-part {
    color: #f8f8f2;
}
.hexed-ascii-part {
    color: #e6db74;
}

.cm-editor {
    height: 100%;
    width: 100%;
    font-size: 0.9rem;
}

/* Fix touch interaction on iOS */
.cm-editor, .cm-scroller, .cm-content, .tab-content, #side-menu {
    touch-action: pan-x pan-y !important;
    overscroll-behavior: none !important;
}

#menu-file-title, #menu-pkg-title, #menu-settings-title, #menu-tools-title {
    font-weight: 600;
}

/* File tree & package list rows */

.tree-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    margin: 5px 0;
    line-height: 1.2em;
}

/* Indentation comes from the nesting itself. The hairline shows which folder a
   row - or the blank space next to it, which is also a drop target - sits in,
   now that the folder icon alone carries the expanded/collapsed state. */
.tree-children {
    margin-left: 0.5em;
    padding-left: 0.25em;
    border-left: 1px dotted #ffffff00;
}

.tree-children:hover {
    border-left: 1px dotted #ffffff20;
}

/* The name shrinks (and ellipsizes) before it ever reaches the trailing
   actions, which stay pinned to the right via the auto margin. */
.tree-row > .name {
    flex: 0 1 auto;
    min-width: 0;
    margin-right: auto;
    overflow-x: clip;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-caret {
    width: 0.8rem;
    opacity: 0.75;
}

.tree-row.dragging {
    opacity: 40%;
}

/* While a row is being renamed, the name slot grows to fill the space between
   the icon and the trailing actions instead of shrinking to fit its content */
.tree-row > .name.renaming {
    flex: 1 1 auto;
    overflow: visible;
}

.tree-rename-input {
    box-sizing: border-box;
    width: 100%;
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
}

.tree-rename-input.folder-rename-input {
    outline: 1px solid var(--accent-color);
}

.tree-node.drop-target,
.tree-row.drop-target,
#menu-file-tree.drop-target {
    outline: 1px dashed var(--accent-color);
    outline-offset: 1px;
    border-radius: 2px;
}

#menu-pkg-list > .title-lines {
    margin: 5px 0;
}

#menu-file-tree .open::after {
    content: "●";
    color: #666;
}

#menu-file-tree .changed::after {
    content: "●";
    color: var(--fg-color-highlight);
}

/* The file changed on the device while unsaved edits were open here. Wins over
   the plain unsaved marker: it is the one that needs a decision. */
#menu-file-tree .changed.conflict::after,
#menu-file-tree .conflict::after {
    content: "▲";
    color: var(--fg-color-highlight);
}

#menu-file-tree .fs-stale {
    color: var(--fg-color-highlight);
}

/* The rename input carries the row's own classes along (open/changed/conflict),
   so its status dot would otherwise render right after the text box */
#menu-file-tree .name.renaming::after {
    content: none;
}

/* Disconnected, or busy running code of its own: the tree is the last known state
   of the board and stays readable, but nothing on it - nor in the package manager,
   which would have to interrupt the board to install anything - can be acted on
   until the board is back and free. */
.inert {
    pointer-events: none;
}

#menu-file-tree .selected {
    color: #ffffff;
    background: #094771;
    border-radius: 1px;
    outline: 2px solid #0e639c;
}

.menu-action {
    flex: 0 0 auto;
    font-weight: normal;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 60%;
}

#menu-settings-list div, #menu-tools-list div {
    margin: 5px 0;
    line-height: 1.2em;
}

/* About */

.about-header {
    text-align: center;
    padding: 50px 0 0 0;
}

.about-logo {
    font-size: 4rem;
    color: #3794ff;
}

.about-title {
    font-size: 1.5em;
}

.about-build {
    font-size: 0.8em;
}

.about-footer {
    text-align: center;
}

/* No JS script banner */

.no-js-banner {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 16px;
    color: #ffffff;
    background: #8a3b00;
    border-bottom: 1px solid #ffb25c;
    font: 14px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
}

.no-js-banner strong {
    font-weight: 600;
}

@media (max-width: 768px) {
    #side-menu {
        position: absolute;
        left: -100%;
        width: 75%;
        top: 0;
        bottom: 0;
        z-index: 1000;
    }

    #side-menu.show {
        left: 0;
    }

    #overlay {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        background-color: transparent;
        overflow: hidden;
        visibility: hidden;
    }

    #overlay.show {
        visibility: visible;
        background-color: #00000088;
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        transition: visibility 0s,
                    background-color var(--animation),
                    backdrop-filter var(--animation),
                    -webkit-backdrop-filter var(--animation);
    }

    #overlay:not(.show) {
        transition: visibility var(--animation),
                    background-color var(--animation),
                    backdrop-filter var(--animation),
                    -webkit-backdrop-filter var(--animation);
    }

    #editor-tabs {
        display: none;
    }
}

@media (max-width: 768px) and (display-mode: standalone) {
    #app-expand {
        display: none;
    }
}
