@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');

:root {
    /* Brand Colors from Logo */
    --brand-red: #E63946;
    --brand-blue: #1E88E5;
    --brand-yellow: #FFD700;
    --brand-purple: #9C27B0;
    --brand-orange: #FF6F00;
    --brand-teal: #009688;
    
    /* Updated UI Colors */
    --main-orange: #31a574; /* Changed to yellow for highlight */
    --main-black: #131313;
    --old-teal: #009688;
    --top-height: 5rem;
    --left-menu-width: 14rem;
    /* --logo-width: 5rem; */
}

html,
body {
    height: 100%;
}

body {
    background-color: #F8F9FA;  /* Light background instead of #fff */
    font-family:Poppins;
    margin: 0;
    overflow: hidden;
    overscroll-behavior: none;
    /*disable pull to refresh */
    /* font-family: BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",Helvetica,Arial,sans-serif; */
    font-family: 'Poppins', sans-serif !important;
}

label {
    user-select: none;
}

input:focus,
textarea:focus,
select:focus,
span:focus {
    outline: none;
}


tt {
    font-size: 0.9em;
    padding: 0.25rem 0.5rem;
    background: #eaeaea;
    margin: 0 0.25em;
    border-radius: 1rem;
    font-weight: bold;
}

.farSide {
  text-align: right;
}

/* Buttons */
button.icon,
label.button.icon {
    border-radius: 2rem;
    border: 1px solid transparent;
    background-color: transparent;
    color: #000;
    padding: .25rem;
    transition: border-color ease .125s;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    /**/
}

.faIcon:before {
    font-weight: 700;
}

.toolbar .topButton {
    color: var(--main-orange) !important;
}

button.icon:hover,
label.button.icon:hover {
    border: 1px solid #aaa;
}

button.icon:active,
label.button.icon:active {
    border-color: #000;
}

button.disabled:hover {
    opacity: 0.6;
}

button.disabled {
    display: none;
}

button.icon.text,
label.icon.text {
    display: inline-flex;
    align-items: center;
    font-weight: bold;
    font-size: 1rem;
    padding: .25em .5em;
    white-space: nowrap;
}

button.icon.text::before,
label.icon.text::before {
    margin-right: .25rem;
    /**/
}

h1 {
  font-weight: normal;
  font-size: 140%;
  margin-left: 5px;
  margin-right: 5px;
}

/* Top menu - GRADIENT TOOLBAR */
.top-menu {
    background: linear-gradient(to right, #E63946, #FF6F00, #FFD700, #1E88E5, #009688);
    height: var(--top-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 .5rem 0 1rem;
  user-select: none;
  width: 100vw;
  box-sizing: border-box;
    /* border-bottom: 1px solid #ccc; */
}
.top-menu > .logo {
  display: flex;
  align-items: center;
    color: white;  /* Changed from #3298dc to white for gradient background */
    font-family: Poppins,Arial, Helvetica, sans-serif;
}



#logo {
    width: calc(var(--left-menu-width) - 1.5rem);
}
/*
.top-menu > .logo:before  {
  content:"";
  display:inline-block;
  width: 2rem;
  height: 2rem;
  background-size: cover;
  background-image: url('media/logo.png');
  background-size: auto 4rem;
  background-position: left calc(-2rem*8) top; 
}
*/
.top-menu > .tabs {
  margin: 0 0.5rem;
  display: flex;
  width: 100%;
    overflow-x: hidden;
    /* padding: .5rem 0; */
    padding: 0;
    /**/
    color: white;
    /* line-height: 40px; */
    height: 100%;
}

.top-menu #channel_connect {
    display: flex;
    border-radius: 2rem;
    border: 1px solid rgba(255,255,255,0.5);  /* Changed for gradient background */
    margin-right: .25rem;
    box-sizing: border-box;
    overflow: hidden;
}

.top-menu #channel_connect>a {
    -webkit-tap-highlight-color: transparent;
    display: inline-block;
    border-radius: 2rem;
    padding: .25rem;
    border: 1px solid transparent;
    box-sizing: content-box;
    margin: -1px;
    opacity: 0.6;
    color: #fff;
}

.top-menu #channel_connect>a.selected {
    opacity: 1;
    border: 1px solid #777;
    transition: box-shadow ease .125s;
    background-color: #fff;
}

.top-menu #channel_connect:hover>a.selected {
    box-shadow: -1px 0 3px #aaa;
}

#loadXML,
#put-file-select {
    display: none;
}

/* Channel Connect Panel */

.channel-panel {
    box-sizing: border-box;
    z-index: 999;
    position: fixed;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 18.5rem;
    transition: .125s ease top, .125s ease opacity, .125s ease transform;
    background: #fff;
    border-radius: 1.5em;
    padding: 0.25rem;
    top: -15rem;
    right: 22rem;
    margin-right: 0;
    border: 1px solid #aaa;
    box-shadow: 0em 0em 0.5em rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.5);
}

.channel-panel#show {
    top: .25rem;
    opacity: 1;
    transform: scale(1);
}

.channel-panel>div>span {
    width: 100%;
    border-radius: 2rem;
    color: #666;
    display: inline-block;
    box-sizing: border-box;
    text-align: left;
    padding: 0.5rem 0.5rem 0.125rem 0.5rem;
}

.channel-panel input,
#file_save_as input {
    border: none;
    padding: 0;
    height: 2rem;
    font-size: 0.8rem;
    font-weight: bold;
}
#device_selector:focus {
  color: #000;
}
@media (max-width: 59.99em) {
  #device_selector {
    width: 13rem;
  }
}
/* Run button */
#runButton {
    border: none;
    margin: -1px;
    opacity: 1;
    padding: 0.25rem .4rem;
    background: #fff;
    color: var(--main-black) !important;
    border: 1px solid var(--main-orange);  /* Yellow border */
}
#runButton:hover {
    box-shadow: -1px 0 3px var(--main-orange);
}

/* Privacy link */
.privacyLink {
  font-family: Poppins,Roboto, Arial, Helvetica, sans-serif;
  font-size: small;
  text-decoration: none;
}

#languageMenu {
  border: none;
  height: 2rem;
  width:100%;
  border-radius: 1rem;
  background: #fff;
  padding: .25em;
}

.account-panel,
.notify-panel,
.notify {
    user-select: none;
    transition: top ease .5s, right ease .5s, opacity ease .125s, background linear .5s, margin-right ease .125s;
    transition-delay: 0s, 0s, .1s, 0s, 0s;
    color: #222;
    opacity: 0;
    background: #fff;
}

@media (min-width: 60em) {
    .account-panel,
    .notify-panel {
        border-radius: 1rem;
        margin: 0.5em;
        border: 1px solid #aaa !important;
    }
}

.toast-container {
    z-index: 100;
}

/* Notifications */
.notify {
    z-index: 999;
    right: -18em;
    bottom: .5em;
    padding: 1em;
    position: fixed;
    box-shadow: 0 .125em .5em rgba(0, 0, 0, .6);
    background: #1E88E5;  /* Changed to brand blue */
    color: #fff;
}
.notify#show {
	opacity: 1;
	right: .5em;
}
.notify hr {
  border: none;
  height: 1px;
  background-color: #fff;
}

.notify-panel>span,
.notify {
    border-radius: .25rem;
}
.notify-panel > span {
  background: #fff;
	padding: 1em;
	display: flex;
	align-items:center;
	justify-content: space-between;
	margin: .25rem 0;
	transition: box-shadow ease .125s;
	box-sizing: border-box;
	border: solid 1px #ccc;
}
.notify-panel > span:hover {
  border-color: #aaa;
	box-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.notify-panel > span > span {
  cursor: pointer;
  opacity: .6;
  transition: opacity linear .125s;
}
.notify-panel > span > span:hover  {
  opacity: 1;
}
.notify-panel, .account-panel{
  position: fixed;
  overflow-y: auto;
  z-index: 998;
  width: 18rem;
  padding: 0 .5em;
  top:3.5rem;
  bottom:0;
  right:-22em;
  background: #fefefe;
  border-left: solid 1px #ccc;
	display: flex;
  box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.5);
}
.account-panel {
  flex-direction: column;
  justify-content: space-between;
}
.notify-panel {
  flex-direction: column-reverse;
  justify-content: end;
}
@media (max-width: 59.99em) {
  .notify-panel, .account-panel{
    padding-top: 4.5rem;
  }
}
.notify-panel#show, .account-panel#show {
	opacity: 1;
	right: 0;
}
/* Progress Bar */
.progress-bar {
  z-index: 500;
  position: fixed;
  left: 0;
  right: 0;
  overflow: hidden;
  height: 0;
  transition: .125s ease height;
    top: var(--top-height);
}
.progress-bar#on {
	height: .25em;
}
.progress-bar div {
	content: '';
	position: absolute;
	height: 100%;
	background: #1E88E5;  /* Changed to brand blue */
}
.progress-bar div{
	width: 0%;
	transition: .125s linear width;
}
@-webkit-keyframes progress {
	0% {
		left: 100%;
		transform: translateX(0);
	}
	100% {
		left: 0;
		transform: translateX(-100%);
	}
}

#account_header {
  font-size: 1.25rem;
  margin: .5em 0;
  display: block;
}

#account_user {
    border-bottom: 1px dashed #666;
    font-weight: bold;
    padding-bottom: .125rem;
}

/* Extension Modal Styling - BIPES Inspired */

/* Modal Container - No backdrop fade */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: transparent; /* No fade effect */
    pointer-events: none; /* Allow clicking through transparent area */
}

.modal-overlay.active {
    display: block;
}

/* Modal Content Container */
.modal-container {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    width: 90%;
    max-width: 1400px;
    height: 80vh;
    border: 2px solid #31a574;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto; /* Re-enable pointer events for modal content */
}

/* Modal Header */
.modal-header {
    background-color: #31a574;
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a8f64;
    flex-shrink: 0;
}

.modal-title {
    margin: 0;
    font-size: 22px;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    line-height: 28px;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #000;
}

/* Search Container */
.search-container {
    padding: 12px 20px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #666;
}

.search-input {
    width: 100%;
    padding: 8px 8px 8px 35px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #31a574;
}

/* Main Content Area with Sidebar */
.extensions-list {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Category Sidebar */
.extension-category-list {
    width: 180px;
    background-color: #f9f9f9;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    flex-shrink: 0;
}

.extension-category-list li {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    transition: background-color 0.2s;
    user-select: none;
}

.extension-category-list li:hover {
    background-color: #e8e8e8;
}

.extension-category-list li.active {
    background-color: #31a574;
    color: white;
    font-weight: bold;
}

.extension-category-list li.hr {
    height: 1px;
    background-color: #ddd;
    margin: 8px 0;
    padding: 0;
    cursor: default;
}

.extension-category-list li.hr:hover {
    background-color: #ddd;
}

/* Extensions Grid Container */
.extension-grid {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* Extensions Grid */
.extension-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.extension-list li {
    display: block;
}

/* Extension Card */
.extension-box {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.extension-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Extension Header */
.extension-box .header {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.extension-box .cover {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.extension-box .cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.extension-box .detail {
    flex: 1;
    min-width: 0;
}

.extension-box .name {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.installed-icon {
    color: #31a574;
    font-size: 13px;
}

.extension-box .author {
    font-size: 11px;
    color: #666;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.extension-box .other {
    font-size: 10px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 6px;
}

.extension-box .other .version {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
}

.extension-box .other a {
    color: #666;
    transition: color 0.2s;
    text-decoration: none;
}

.extension-box .other a:hover {
    color: #31a574;
}

/* Extension Description */
.extension-box .description {
    font-size: 12px;
    color: #555;
    margin: 8px 0;
    line-height: 1.4;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Extension Buttons */
.extension-box .button {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.extension-box .button button {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.extension-install {
    background-color: #31a574;
    color: white;
}

.extension-install:hover:not(:disabled) {
    background-color: #2a8f64;
}

.extension-uninstall {
    background-color: #e74c3c;
    color: white;
}

.extension-uninstall:hover:not(:disabled) {
    background-color: #c0392b;
}

.extension-box .button button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #31a574;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.empty-state p {
    margin: 0;
    color: #666;
}

/* Scrollbar styling */
.extension-category-list::-webkit-scrollbar,
.extension-grid::-webkit-scrollbar {
    width: 8px;
}

.extension-category-list::-webkit-scrollbar-track,
.extension-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.extension-category-list::-webkit-scrollbar-thumb,
.extension-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.extension-category-list::-webkit-scrollbar-thumb:hover,
.extension-grid::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Hide extension when filtered out */
.extension-list li[style*="display: none"] {
    display: none !important;
}
    font-size: 1rem;
    display: inline-block;
    box-sizing: border-box;
    width: 100%;
}

.channel-panel input:focus {
    outline: 0 !important;
}

.channel-panel #url,
.channel-panel #password {
    border-bottom: 1px solid #ccc;
}

.channel-panel #url {
    margin-bottom: 1rem;
}

.channel-panel #url:disabled {
    background-color: #fff;
}

#bluetoothButton,
#serialButton,
#networkButton,
#scanButton {
    display: inline-flex;
    align-items: center;
}

.channel-panel .icon:before {
    margin-right: .25rem;
}

.channel-panel>div {
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 1.25rem;
    text-align: end;
    width: 100%;
}

#closeZone {
    position: absolute;
    width: 100vw;
    height: 100%;
    top: 0;
    z-index: 997;
    display: none;
}

#closeZone.on {
    display: block;
}

.checkswitch {
    -webkit-tap-highlight-color: transparent;
    display: flex;
    justify-content: space-between;
    line-height: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}
input.checkswitch[type="checkbox"] {
  -webkit-tap-highlight-color: transparent;
    display: none;
}

.checkswitch input:checked~#checkswitchspan {
    background: #009688;  /* Changed to brand teal */
}

.checkswitch input:checked~span {
    background: #009688;  /* Changed to brand teal */
}

.checkswitch #checkswitchspan {
    width: 2.5em;
    height: 1.5em;
    background: grey;
    display: inline-block;
    border-radius: 1.5em;
    position: relative;
    line-height: 1.5rem;
}

.checkswitch span {
    height: 1.5em;
    display: inline-block;
    position: relative;
    line-height: 1.5rem;
}

.checkswitch #checkswitchspan::after {
    content: "";
    position: absolute;
    top: 0.074em;
    left: 0.075em;
    width: 1.35em;
    height: 1.35em;
    background: rgb(255, 255, 255);
    border-radius: 1.35em;
    transition: left 0.25s ease-out 0s, transform 0.25s ease-out 0s;
    box-shadow: rgb(0 0 0 / 20%) 0px 1px 3px;
}

.checkswitch input:checked~#checkswitchspan::after {
    left: -0.27em;
    transform: translateX(100%);
}

.checkswitch input:checked~span::after {
    left: -0.27em;
    transform: translateX(100%);
}

#scanButton {
  line-height:1.25rem;
  font-size: 0.8rem;
  margin: 0.125rem;
  padding-right: 0.5rem;
}

#bluetoothButton,
#serialButton,
#networkButton {
    font-weight: bold;
    line-height: 1.75rem;
    font-size: 1rem;
    width: 100%;
}

.channel-panel>div:first-of-type {
    margin: 0.25rem 0;
}

#connectButton {
    border: none;
    background: none;
}

#channelButton {
  border-color: #aaa;
  margin: -1px;
  background: #fff;
}

#channel_connect.wait,
#toolbarButton.wait {
    animation: blinking 1s infinite;
}

@keyframes blinking {
    0% {
        background-color: #fff;
    }
    50% {
        background-color: #1E88E5;  /* Changed to brand blue */
    }
    100% {
        background-color: #fff;
    }
}

#networkButton,
#serialButton {
    margin-top: -1px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

#scanButton:hover:before {
  animation:spin 1s linear infinite;
}

/* Tabs */

.tabs>div {
    min-width: auto !important;
    padding: 0rem 1.3rem;
    transition: box-shadow ease .125s, background-color linear .125s, border-color linear .125s, color linear .125s;
    margin: 0;
    border: 0px;
    background: none;
}

@media (max-width:88rem) {
    .tabs>div {
        padding: 0 1.3rem;
    }
}

.tabs>div.on {
    white-space: nowrap;
    background: var(--main-orange);  /* Yellow highlight */
    color: var(--main-black);
    font-weight: 750;
}

.tabs>div {
    cursor: pointer;
    text-transform: capitalize;
    font-size: 0.9rem;
    font-weight: 550;
    text-transform: uppercase;
    vertical-align: middle;
    height: 100%;
    line-height: var(--top-height);
}

.tabs>div:hover {
    background-color: var(--main-orange);  /* Yellow highlight */
    color: var(--main-black);
    font-weight: 750;
}

.tabs>div.on:hover {
    color: var(--main-black) !important;
}

table {
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    border: none;
}

td {
    padding: 0;
    vertical-align: top;
}

#content_blocks,
#content_iot {
    visibility: hidden;
}

.content:not(#content_blocks):not(#content_iot) {
    display: none;
}

.content {
    width: 100vw;
    top: var(--top-height);
    margin: 0;
  position: absolute;
	opacity: 0;
}
.content:not(#content_blocks) {
	transition: .125s ease left, .125s ease opacity, .125s ease width;
}
.content#content_blocks {
  margin-top: -1px;
}

.content.ani#content_blocks,
.content.ani#content_iot,
#content_iot.ani #content_iot {
    visibility: visible !important;
}

.content.ani:not(#content_console):not(#content_files) {
  display: block !important;
}
.content.ani#content_console {
  display: flex !important;
}
.content.ani#content_files {
  display: grid !important;
}
.content.ani.on {
  left: 0;
  opacity: 1;
}
.content.pos1 {
  width: 50vw !important;
}
.content._pos1 {
  width: 50vw;
  left: -1em !important;
}
.content.pos2 {
  width: 50vw;
  left: 50vw !important;
  border-left: 1px solid #ccc;
}
.content._pos2 {
  width: 50vw;
  left: calc(50vw + 1em) !important;
}
pre.content {
  border: 1px solid #ccc;
  overflow: scroll;
}

#content_blocks,
#content_device,
#content_code,
#content_console,
#content_files,
#content_device,
#content_programs,
#content_mqtt,
#content_iot,
#content_databoard {
    height: calc(100vh - var(--top-height));
}

#content_device,
#content_code,
#content_console {
    overflow-y: auto;
    overflow-x: hidden;
}
#content_device #device_img {
  max-width: 75rem;
  width: 100%;
}
.blocklySvg {
  border-top: none !important;
}

#content_console #file-boxes button {
    white-space: nowrap;
    margin-left: .5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 0;
    background-color: var(--main-orange);  /* Yellow */
    font-size: 0.8rem;
    text-transform: uppercase;
}

#content_xml {
  resize: none;
  outline: none;
    border: none;
    font-family: monospace;
    width: 100%
}

#content_console {
    flex-direction: column;
    align-items: center;
}

#content_console #term {
    padding: 0.5em;
    background: #000;
    margin: .75rem 0;
    overflow: hidden;
    border-radius: .5rem;
    transition: box-shadow ease .125s;
    box-shadow: 0 0.125rem .25rem rgba(0, 0, 0, .5);
    overscroll-behavior: none;
}

#tipsGeneric,
#tipsGeneric, #languageIcon {
  display: inline-flex;
  align-items: center;
  border: 1px solid #aaa;
  padding: .5rem;
  border-radius: 2rem;
  opacity: 0.8;
  margin: .5rem 0;
}
#languageIcon {
  border: none;
}

#tipsGeneric:before {
    margin-right: .25rem;
    text-align: center;
}
#content_console #term.on{
  box-shadow: -0.25rem 0rem .75rem #1E88E5, .25rem .25rem .75rem #9C27B0;  /* Brand blue and purple */
}
#content_console button {
    line-height: 1.5rem;
    font-size: 0.8rem;
}

#content_console>div,
#content_console>div>span {
    display: inline-flex;
    align-items: center;
}

#file-boxes {
    flex-wrap: wrap;
    justify-content: center;
    user-select: none;
}

/* Files */

#content_files {
    grid-template-columns: 18rem calc(100% - 18rem);
}

#content_file_name {
    /* color: white; */
    /* background-color: var(--main-black); */
}

#file-boxes #file-header,
#file-boxes #file-status {
    padding: 0 .25em 0 .5em;
    text-align: center;
}
#file-boxes #file-header  {
  display: flex;
  height: 2.5rem;
  align-items: center;
  justify-content: space-between;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    border-right: 1px solid #ccc;
}

#file-boxes #file-header>span {
    flex-grow: 2;
}

#file_save_as {
    height: 2.5rem;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    padding: 0 .5rem 0 1.85rem
}

#file_save_as.py #updateXMLButton,
#file_save_as.py #generated2DeviceButton {
    display: none;
}

#file_save_as.bipes-xml #editor2DeviceButton,
#file_save_as.bipes-xml #generated2DeviceButton {
    display: none;
}

#file_save_as.bipes-py #editor2DeviceButton,
#file_save_as.bipes-py #updateXMLButton {
    display: none;
}

#file_save_as.bipes-xml #uploadAsDiv,
#file_save_as.pyOnDevice #uploadAsDiv {
    display: none;
}
#file_save_as input {
  font-weight: bold;
  border-left: 1px solid #ccc;
  padding-left: .5rem;
}
#file-boxes #file-status {
  height: 1.5rem;
  line-height: 1.5rem;
  border-bottom: 1px solid #ccc;
  border-right: 1px solid #ccc;
  color:#666;
  font-size: 0.85rem;
  overflow: hidden;
  font-weight: bold;
  background: #f7f7f7;
}

#filesPanel {
    display: block;
    height: calc(100vh - 8rem);
    overflow-y: auto;
    padding: 0.25rem 0.5rem;
}

#filesPanel h2,
.account-panel h2 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    margin: 0;
    height: 2.5rem;
}

#fileList>div,
#fileTemplate>div,
#blocks2Code>div,
#ProjectList>div {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    margin: 0.25rem 0;
    padding: 0.25rem;
    border-radius: .25rem;
    border: 1px solid #ccc;
    cursor: pointer;
    min-height: 2rem;
    font-size: 0.9rem;
}

#fileList>div>div:last-child,
#ProjectList>div>div:last-child {
    flex-shrink: 0;
}

#fileList .runText,
#ProjectList .runText {
    width: 100%;
    font-family: Poppins;
}

#fileTemplate>div,
#blocks2Code>div {
    align-items: center;
    word-break: break-word;
    font-family: Poppins;
}

#fileList>div>div,
#ProjectList>div>div {
    display: inline-flex;
    align-items: center;
    word-break: break-word;
}

#fileList .runText>span,
#blocks2Code>div>span {
    font-size: 0.8rem;
    border: 1px solid #9C27B0;  /* Brand purple */
    border-radius: .75rem;
    padding: .175rem .25rem;
    color: #9C27B0;  /* Brand purple */
    margin-left: .25rem;
    font-weight: bold;
    word-break: keep-all;
    font-family: Poppins;
}

#fileList #runIcon {
    filter: brightness(0)
}

#filesPanel details,
.account-panel summary {
    overflow: hidden;
    transition: .125s ease border;
}

#filesPanel summary,
.account-panel summary {
    -webkit-tap-highlight-color: transparent;
    white-space: normal;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#filesPanel summary>h2:before,
.account-panel summary>h2:before {
    content: "\1433";
    margin-right: .5rem;
    transition: transform .25s ease;
    display: inline-block;
    font-weight: normal;
    font-size: 0.8rem;
    line-height: 1rem;
}

#filesPanel details[open] summary>h2:before,
.account-panel details[open] summary>h2:before {
    transform: rotateZ(90deg);
}

#ProjectList>div {
    transition: box-shadow ease .125s, background-color linear .125s, border-color linear .125s, color linear .125s;
}

#ProjectList>.current {
    color: #fff;
    background: var(--main-orange);  /* Yellow */
    box-shadow: 0 0.125em 0.25em var(--main-black);
}
#ProjectList .current span {
  filter: invert(1);
}
#put-file-select-cloud:before {
  background-position: left calc(-1.5rem*19) top;
}
/* Toolbar */
@media (min-width: 60em) {
  .top-menu > .toolbar {
    display: flex;
    height: 2.125rem;
  }
  .top-menu > #toolbarButton {
    display: none;
  }
}
@media (max-width: 59.99em) {
  .top-menu > .toolbar {
    box-sizing: border-box;
    z-index: 999;
    position: fixed;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    height: 7rem;
    width: 18.5rem;
    transition: .125s ease right, .125s ease top, .125s ease opacity;
    background: #fff;
    border-radius: 1em;
    top:  -5rem;
    right: -20rem;
    margin-right: 0;
    border: 1px solid #aaa;
    box-shadow: 0em 0em 0.5em rgba(0,0,0,0.5);
    opacity: 0;
  }
  .top-menu > .toolbar#show {
    top: .25rem;
    right: .25rem;
    opacity: 1;
  }
  .toolbar > #channel_connect {
    order:1;
    margin-right: 0;
    margin-left: .125rem;
  }
  .logo {
    font-size: 0 !important;
  }
  #toolbarButton {
    border-radius: 1rem;
    border: 1px solid #aaa;
    transition: .125s ease box-shadow;
  }
  #toolbarButton:hover {
    box-shadow: 0em 0em 0.25em #aaa;
  }
  .channel-panel {
    right: -16rem;
    top: 3.5rem;

  }
  .channel-panel#show {
    right: .25rem;
    top: 3.5rem;
  }
}


#extensionButton {
  background-image: url('./media/exticon.svg');
  background-position: center;
  background-size: 70%;
  background-repeat: no-repeat;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
}

#extensionButton:before, #downloadIcon:before{
  background: none;
  content: none;
}
/* Sprited icons. */

button.icon:before,
#deviceSelect.icon:before,
a.icon:before,
span.icon:before,
label.icon:before {
    content: "";
    background-size: cover;
  background-image: url(media/icons.svg);
    width: 1.5rem;
    height: 1.5rem;
    background-size: auto 3rem;
}

button.icon:before,
label.icon:before {
    display: block;
}
span.icon:before {
  display:inline-block;
}

button.icon.medium:before  {
  width: 2.5rem;
  height: 2.5rem;
  background-size: auto 5rem;
}
#linkButton:before {
  background-position: left calc(-1.5rem*0) top;
}
#saveButton:before, #downloadIcon:before  {
  background-position: left calc(-1.5rem*1) top;
}
#loadButton:before {
  background-position: left calc(-1.5rem*2) top;
}

#trashButton:before, #trashIcon:before {
  background-position: left calc(-1.5rem*3) top;
}
#notificationButton:before {
  background-position: left calc(-1.5rem*4) top;
}
#deviceSelect:before {
  background-position: left calc(-1.5rem*7) top;
}
#runButton:before, #runIcon:before {
  transition: background ease .125s;
  background-position: left calc(-1.5rem*5) top;
}
#runButton.on:before {
  background-position: left calc(-1.5rem*5) bottom;
}
#languageIcon:before {
  background-position: left calc(-1.5rem*6) top;
}
#serialButton:before, #channelButton.webserial:before {
  background-position: left calc(-1.5rem*9) top;
}
#networkButton:before, #channelButton.websocket:before {
  background-position: left calc(-1.5rem*10) top;
}
#toolbarButton:before {
  background-position: left calc(-2.5rem*11) top;
}
#toolbarButton.on:before {
  background-position: left calc(-2.5rem*11) bottom;
}
#forumButton:before {
  background-position: left calc(-1.5rem*12) top;
}
#bluetoothButton:before, #channelButton.webbluetooth:before {
  background-position: left calc(-1.5rem*15) top;
}
#connectButton:before {
  background-position: left calc(-1.5rem*13) top;
}
#connectButton.on:before {
  background-position: left calc(-1.5rem*13) bottom;
}
#scanButton:before {
  background-position: left calc(-1.5rem*14) top;
}
#settingsGeneric:before {
  background-position: left calc(-1.5rem*16) top;
}
#tipsGeneric:before {
  background-position: left calc(-1.5rem*17) top;
}
#refreshFilesList:before {
  background-position: left calc(-1.5rem*18) top;
}
#putFileButton:before, #editor2DeviceButton:before, #generated2DeviceButton:before{
  background-position: left calc(-1.5rem*19) top;
}
#updateXMLButton:before {
  background-position: left calc(-1.5rem*20) bottom;
}
#accountButton:before {
  background-position: left calc(-1.5rem*22) top;
}
#newProjectButton:before {
  background-position: left calc(-1.5rem*23) top;
}


@media (max-width: 710px) {
  .tab_collapse {
    display: none;
  }
}

/*Select*/

#deviceSelect {
    display: inline-flex;
    align-items: center;
    border-radius: 2rem;
    padding-left: .5rem;
    background-color: white;
    border: 1px solid var(--main-orange);  /* Yellow border */
}
#device_selector {
    appearance: none;
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    height: 2rem;
}

#firmwareButton {
    background-image: url('./media/firmwareicon.svg'); /* Add your icon path */
}

#firmwareButton::before {
    font-size: 1.2em;
}
#signoutButton {
    background-image: url('./media/firmwareicon.svg'); /* Add your icon path */
}

#signoutButton::before {
    font-size: 1.2em;
}
