ui/arduino/main.css
/*
  On 20250303, due to font files inconsistencies, we sourced the updated fonts from here:
  https://github.com/alsacreations/webfonts
  
*/
@font-face {
  font-family: "CodeFont";
  src:
    url("media/Roboto-Mono-Regular-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "CodeFont";
  src:
    url("media/Roboto-Mono-Bold-webfont.woff") format("woff");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "OpenSans";
  src: url("media/opensans-regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "OpenSans";
  src: url("media/opensans-bold.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
}

* {
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  font-family: "OpenSans", sans-serif;
}

body, html {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

img {
  max-width: 100%;
  max-height: 100%;
}

button {
  display: flex;
  width: 45px;
  height: 45px;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: none;
  border-radius: 45px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.1s;
}
button.small {
  width: 28px;
  height: 28px;
  border-radius: 28px;
}
button.square {
  border-radius: 8px;
}
button.inverted:hover,
button.inverted.active {
  background: rgba(0, 129, 132, 0.8) !important;
}
button.inverted {
  background: rgba(0, 129, 132, 1) !important;
}

button[disabled], button[disabled]:hover{
  cursor: default;
  opacity: 0.5;
}

button:not([disabled]):hover {
  background: rgba(255, 255, 255, 1);
}

button.active {
  background: rgba(255, 255, 255);
}

button .icon {
  width: 63%;
  height: 63%;
}
button.small .icon {
  width: 63%;
  height: 63%;
}


.button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-content: space-between;
  align-items: center;
  gap: .5em;
  width: auto
}
.button.first{
  width:80px;
}
.button .label {
  text-align: center;
  color: rgba(255, 255, 255, 0.2);
  font-family: "OpenSans", sans-serif;
}
.button .label.active {
  color: rgba(255, 255, 255, .9);
}
.button .tooltip {
  opacity: 0;
  position: absolute;
  top: 120%;
  left: 0;
  font-size: 10px;
  background: #fff;
  padding: 8px;
  z-index: 99;
  transition: all 0.1s;
  transition-delay: 0.0s;
  pointer-events: none;
  text-align: center;
  transform: translateY(-10px);
  box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
              0px 3px 1px -2px rgba(0, 0, 0, 0.12),
              0px 1px 5px 0px rgba(0, 0, 0, 0.20);
}

.button:focus .tooltip,
.button:hover .tooltip {
  opacity: 1;
  transform: translateY(0px);
  transition: all 0.25s;
  transition-delay: 0.5s;
}

#app {
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  font-family: "CodeFont", monospace;
  overflow: hidden;
}

.working-area {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

#navigation-bar {
  display: flex;
  width: 100%;
  background: #008184;
  justify-content: space-between;
}

#toolbar {
  display: flex;
  padding: 16px 10px 10px 10px;
  align-items: center;
  gap: 16px;
  align-self: stretch;
  background: #008184;
}

#app-views {
  display: flex;
  padding: 16px 10px 10px 10px;
  width: 120px;
  /* gap: 16px; */
}

#app-views .button{
  flex-grow: 1;
  width: 100%;
}

#app-views .button button{
  width: 100%
}

#app-views .button .label{
  
}
#app-views .button .label.selected{
  font-weight: bold;
}

#app-views div:first-child button{
  border-radius: 8px 0px 0px 8px;
  
}
#app-views div:last-child button{
  border-radius: 0px 8px 8px 0px;
  
}

.separator {
  height: 100%;
  min-width: 1px;
  flex-basis: fit-content;
  background: #fff;
  opacity: 0.7;
  position: relative;
  margin-left: 0.5em;
  margin-right: 0.5em;
  height: 65%;
}

#tabs {
  display: flex;
  padding: 10px 10px 0px 60px;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  background: #ECF1F1;
  font-size: 14px;
}

.tab {
  display: flex;
  padding: 10px;
  align-items: center;
  gap: 10px;
  flex: 1 0 0;
  align-self: stretch;
  cursor: pointer;
  background: #DAE3E3;
  overflow: hidden;
  transition: all 0.1s;
}

.tab:hover {
  background: #e3eaea;
}

.tab.active {
  background: #FFF;
}

.tab .icon {
  height: 16px;
}
.tab .text {
  color: #000;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3em;
  flex: 1 0 0;
  max-width: calc(100% - 46px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tab .options {
  display: flex;
  align-items: center;
  align-self: stretch;
  cursor: pointer;
  height: 16px;
  width: 16px;
}
.tab .options button {
  background: none;
  width: 100%;
  height: 100%;
}
.tab .options button .icon {
  width: 100%;
  height: 100%;
}
.tab .options:hover button {
  background: rgba(255, 255, 255, 0.5);
}

.tab .text input {
  box-sizing: border-box;
  border: none;
  border-radius: none;
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.5);
  font-family: inherit;
  font-size: inherit;
  outline-color: #F4BA00;
}

#code-editor {
  flex: 1 0 0;
  align-self: stretch;
  font-size: 16px;
  height: 100%;
  overflow: hidden;
  
}

#code-editor * {
  font-family: "CodeFont", monospace;
}
#code-editor .cm-editor {
  width: 100%;
  height: 100%;
  outline: none;
}

#code-editor .cm-content {
  padding-top: 16px;
}
#code-editor .cm-line {
  padding-left: 16px;
}

#code-editor .cm-gutters {
  background-color: #ECF1F1;
  border-right: none;
  width: 60px;
  font-size: 14px;
}

#code-editor .cm-activeLineGutter {
  background-color: #DAE3E3;
}

#code-editor .cm-gutter {
  width: 75%;
}
#code-editor .cm-foldGutter {
  width: 25%;
}
#code-editor .cm-gutterElement {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
#code-editor .cm-gutterElement span[title="Fold line"] {
  padding-bottom: 8px;
}

#code-editor .cm-activeLine {
  background-color: transparent;
}

#panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  position: relative;
  background: black;
  transition: height 0.15s;
}

#panel {
  min-height: 45px;
}

#panel.dialog-open {
  pointer-events: none;
}

#panel #drag-handle {
  flex-grow: 2;
  height: 100%;
  cursor: grab;
  position: absolute;
  width: 100%;
}

#panel #drag-handle:active {
  cursor: grabbing;
}

.panel-bar {
  display: flex;
  height: 45px;
  padding: 0px 10px;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  background: #008184;
  position: relative;
}

.panel-bar #connection-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.panel-bar #connection-status img {
  width: 1.25em;
  height: 1.25em;
  filter: invert(1);
}

.panel-bar .spacer {
  flex-grow: 1;
}
.panel-bar .term-operations {
  transition: opacity 0.15s;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  align-self: stretch;
}

.panel-bar .term-operations.hidden {
  opacity: 0;
  transition-delay: 0.15s;
  pointer-events: none;
}
.panel-bar .term-operations.visible {
  opacity: 1;
  transition-delay: 0.15s;
}

.terminal-wrapper {
  color: white;
  width: 97%;
  margin-left: 2%;
  overflow: hidden;
  position: absolute;
  top: 60px; /* 45 + 15 */
  height: calc(100% - 75px);
}

.terminal-enabled,
.terminal-disabled {
  width: 100%;
}
.terminal-disabled {
  opacity: 0.5;
}

.dialog {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  transition: opacity 0.15s;
  border: none;
  background: none;
  font-size: 24px;
  font-style: normal;
  line-height: normal;
  background: rgba(236, 241, 241, 0.50);
}

.dialog.open {
  opacity: 1;
  pointer-events: inherit;
  transition: opacity 0.15s;
}



.dialog .dialog-content {
  display: flex;
  width: 576px;
  padding: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  background: #FFF;
  box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
              0px 3px 1px -2px rgba(0, 0, 0, 0.12),
              0px 1px 5px 0px rgba(0, 0, 0, 0.20);
  transform: translateY(20px);
  transition: transform 0.15s;
}

.dialog.open .dialog-content {
  transform: translateY(0px);
  transition: transform 0.15s;
}


.dialog .dialog-content #file-name {
  font-size: 1.3em;
  width:100%;
  font-family: "CodeFont", monospace;
}

.dialog .dialog-content input:focus {
  outline-color: #008184;
}
.dialog .dialog-content .item {
  border-radius: 4.5px;
  display: flex;
  padding: 10px;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  cursor: pointer;
}

.dialog .dialog-content .item:hover {
  background: #008184;
  color: #ffffff;
}

.dialog .buttons-horizontal {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%;
  gap: 12px;
}
.dialog .buttons-horizontal .item {
  flex-basis: 50%;
  align-items: center;
  background-color: #eee;;
}

.dialog-title{
  width: 100%;
  font-size: 0.8em;
  padding: 0;
  margin: 0;
  flex-basis: max-content;
}
.dialog-feedback {
  font-size: 0.6em;
  align-self: stretch;
  padding: 0.5em;
  background: #eee;
}

#file-manager {
  display: flex;
  padding: 12px 32px 24px 32px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex: 1 0 0;
  align-self: stretch;
}

#board-files,
#disk-files {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 0 0;
  align-self: stretch;
  width: calc(50vw - 64px);
}

#file-actions {
  display: flex;
  width: 32px;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  align-self: stretch;
}

#file-actions button[disabled], #file-actions button[disabled]:hover {
  opacity: 0.4;
}

#file-actions button .icon {
  width: 100%;
  height: 100%;
}

#file-actions button:hover {
  opacity: 0.5;
}

.device-header {
  display: flex;
  padding: 10px 0;
  align-items: flex-start;
  align-self: stretch;
  width: 100%;
}

.device-header button {
  width: 32px;
  height: auto;
  padding: 0;
}

.device-header .icon {
  width: 22px;
  height: 22px;
}

.device-header .text {
  width: 100%;
  height: 1.8em;
  position: relative;
  cursor: pointer;
  color: #000;
  font-family: "CodeFont", monospace;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
  overflow: hidden;
}

.device-header .text span {
  position: absolute;
  right: 0;
  min-width: calc(100% - 30px);
  display: flex;
  align-items: center;
  padding-right: 10px;
}


.device-header .text::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 100%;
  background: linear-gradient(0.25turn, white 25%, rgba(0, 0, 0, 0));
  z-index: 98;
}

.file-list {
  display: flex;
  align-items: flex-start;
  flex: 1 0 0;
  align-self: stretch;
  background: #ECF1F1;
  height: 100%;
  overflow-y: scroll;
}

.file-list .list {
  display: flex;
  padding: 6px 8px;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 0 0;
  align-self: stretch;
  width: calc(100% - 40px);
}

.file-list .item {
  display: flex;
  height: 28px;
  min-height: 28px;
  max-height: 28px;;
  padding: 5px 10px;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  transition: all 0.1s;
}

.file-list .item.selected,
.file-list .item:hover {
  background: #FFF;
}

.file-list .item .options {
  display: flex;
  opacity: 0;
  align-items: center;
  align-self: stretch;
  cursor: pointer;
  transition: all 0.1s;
}

.file-list .item:hover .options {
  opacity: 1;
}

.file-list .item .icon {
  width: 32px;
  height: 32px;
}
.file-list .item .text {
  color: #000;
  font-family: "CodeFont", monospace;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3em;
}

.file-list .item .checkbox .icon.off,
.file-list .item .checkbox .icon.on {
  display: none;
}

.file-list .item:hover .checkbox.unchecked .icon {
  display: none;
}
.file-list .item:hover .checkbox.unchecked .icon.off {
  display: block;
}

.file-list .item .checkbox.checked .icon {
  display: none;
}
.file-list .item .checkbox.checked .icon.on  {
  display: block;
}

.file-list .item input {
  box-sizing: border-box;
  border: none;
  border-radius: none;
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.5);
  font-family: inherit;
  font-size: inherit;
  outline-color: #F4BA00;
}

#code-editor .cm-panels {
  border-color: #DAE3E3;
  padding: 0 10px;
  margin: 0;
}
#code-editor .cm-panels .cm-search {
  display: flex;
  align-items: center;
  height: 45px;
  padding: 0;
  background: #ECF1F1;
  gap: 10px;
}
#code-editor .cm-panels label {
  display: none;
}
#code-editor .cm-panels input,
#code-editor .cm-panels button {
  height: 28px;
  margin: 0;
  padding: 0;
  width: auto;
}
#code-editor .cm-panels button {
  border: none;
  border-radius: none;
  font-family: inherit;
  background: none;
}
#code-editor .cm-panels input {
  box-sizing: border-box;
  padding: 0 10px;
  border: none;
  width: 100%;
  background: rgba(255, 255, 255, 1.0);
  font-family: inherit;
  font-size: 14px;
  outline-style: none;
}
#code-editor .cm-panels input:focus {
  outline-style: solid;
  outline-color: #F4BA00;

}
#code-editor .cm-panels [name="replace"],
#code-editor .cm-panels [name="replace"],
#code-editor .cm-panels [name="replaceAll"] {
  display: none;
}
#code-editor .cm-panel.cm-search [name="close"] {
  position: relative;
}

#overlay {
  position: fixed;
  display: flex;
  background: rgba(255, 255, 255, 0.5);
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  pointer-events: none;
  opacity: 0;
  text-align: center;
}

#overlay.open {
  width: 100%;
  height: 100%;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  pointer-events: all;
  cursor: wait;
  opacity: 1;
}

#overlay.open > * {
  background: white;
  padding: 1em 1.5em;
}
