/* Theme variables */
:root {
  --bitdoglab-primary: #4b2e83;
  --bitdoglab-secondary: #85754d;
  --bitdoglab-tertiary: #b7a57a;
  --bitdoglab-light: #f5f5f5;
  --bitdoglab-dark: #2d1a4f;
  --bitdoglab-accent: #ff8c00;
  --bitdoglab-success: #4CAF50;
  --bitdoglab-warning: #FFC107;
  --bitdoglab-error: #F44336;
  --font-primary: 'Comic Sans MS', 'Marker Felt', sans-serif;
  --font-secondary: BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
  --border-radius-large: 1rem;
  --border-radius-medium: 0.75rem;
  --border-radius-small: 0.5rem;
  --shadow-normal: 0 2px 5px rgba(0,0,0,0.2);
  --shadow-hover: 0 4px 8px rgba(0,0,0,0.3);
}

body {
  background-color: var(--bitdoglab-light);
  font-family: var(--font-secondary);
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

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

/* 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;
}
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 */
.top-menu {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 0 .5rem 0 1rem;
  user-select: none;
  width: 100vw;
  box-sizing: border-box;
  border-bottom: 1px solid var(--bitdoglab-primary);
  background-color: var(--bitdoglab-primary);
  color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.top-menu > .logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.125;
  color: white;
  font-family: var(--font-primary);
  padding: 0.3rem 0;
}

.top-menu > .logo:before {
  content:"";
  display:inline-block;
  width: 2.5rem;
  height: 2.5rem;
  background-size: cover;
  background-image: url(../assets/images/logos/bitdoglab.jpg);
  background-position: center;
  border-radius: 50%;
  margin-right: 0.5rem;
  border: 2px solid var(--bitdoglab-tertiary);
}

.top-menu > .tabs {
  margin: 0 0.5rem;
  display: flex;
  width: 100%;
  overflow-x: auto;
  padding: .5rem 0;
  font-family: var(--font-primary);
}

.tabs div {
  border-radius: 1rem;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  font-weight: bold;
}
.top-menu #channel_connect {
  display: flex;
  border-radius: 2rem;
  border: 1px solid #888;
  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;
}
.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: 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;
}

#serialButton {
  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%;
}

.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 ~ span {
    background: #3298dc;
}
.checkswitch span {
    width: 2.5em;
    height: 1.5em;
    background: grey;
    display: inline-block;
    border-radius: 1.5em;
    position: relative;
    line-height: 1.5rem;
}
.checkswitch span::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 ~ span::after {
    left: -0.27em;
    transform: translateX(100%);
}

#serialButton {
  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;
}
@-webkit-keyframes blinking {
		0%		{ background-color: #fff;}
		50%	 { background-color: var(--bitdoglab-accent);}
		100%	 { background-color: #fff;}
}
@keyframes blinking {
		0%		{ background-color: #fff;}
		50%	 { background-color: var(--bitdoglab-accent);}
		100%	 { background-color: #fff;}
}

@-webkit-keyframes spin { 100% { transform:rotate(360deg); } }
@keyframes spin { 100% { transform:rotate(360deg); } }

/* Tabs */
.tabs > div {
  min-width: auto !important;
  padding: 0.75rem .75rem;
  transition: box-shadow ease .125s, background-color linear .125s, border-color linear .125s, color linear .125s;
  margin: 0 0.125rem;
  border-radius: .25rem;
  border: 1px solid #fff;
}
@media (max-width:88rem) {
  .tabs > div {
    padding: .25rem;
    margin: 0rem 1px;
  }
}
.taboff, .tabon {
  -webkit-tap-highlight-color: transparent;
  padding: 0.7em .5rem;
  margin: 0 4px;
  border-radius: 0.75em;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.taboff {
  background-color: var(--bitdoglab-tertiary);
  color: white;
  border: none;
}

.taboff:hover {
  background-color: var(--bitdoglab-secondary);
  transform: translateY(-2px);
}
.tabon {
  font-weight: bold;
  background-color: var(--bitdoglab-accent);
  color: white;
  border: none;
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.tabs > div.on {
  box-shadow: 0 .125em .5em #ccc;
  white-space: nowrap;
  background: #3298dc;
  color: #fff;
  border-color: #3298dc;
}
.tabs > div {
  cursor: pointer;
}
.tabs > div:hover {
  border-color: #3298dc;
  color: #3298dc;
}
.tabs > div.on:hover {
  color: #fff !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: 4rem;
  margin: 0;
  position: absolute;
  opacity: 0;
  background-color: var(--bitdoglab-light);
  border-radius: 0.5rem 0.5rem 0 0;
  overflow: hidden;
}
.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-padding {
  padding: 0;
}
#content_blocks, #content_device, #content_code, #content_console, #content_files, #content_device, #content_programs, #content_mqtt, #content_iot, #content_databoard {
  height: calc(100vh - 4rem);
}
#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;
  background-color: #1e2749 !important;
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
    radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px),
    radial-gradient(rgba(255,255,255,.4), rgba(255,255,255,.1) 2px, transparent 30px) !important;
  background-size: 550px 550px, 350px 350px, 250px 250px, 150px 150px !important; 
  background-position: 0 0, 40px 60px, 130px 270px, 70px 100px !important;
  background-attachment: fixed !important;
}

/* Button styles */
button {
  transition: all 0.3s ease;
}

button:hover {
  transform: scale(1.05);
}

/* Console buttons */
#content_console #file-boxes button {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 5px;
    padding: 0.6rem 1rem;
    margin: 8px;
    cursor: pointer;
    transition: all 0.2s ease-out;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 90% 100%, 0% 100%);
    box-shadow: 0 0 4px rgba(0, 242, 254, 0.5), 0 0 8px rgba(0, 242, 254, 0.4);
}

#content_console #file-boxes button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 8px #00f2fe, 0 0 16px #00f2fe, 0 0 24px #4facfe;
}

#content_console #file-boxes button:active {
    transform: translateY(1px);
    box-shadow: 0 0 2px rgba(0, 242, 254, 0.3);
}

/* Space background */
#content_console, #content_device {
  background-color: #1e2749;
  background-image:
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
    radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px),
    radial-gradient(rgba(255,255,255,.4), rgba(255,255,255,.1) 2px, transparent 30px);
  background-size: 550px 550px, 350px 350px, 250px 250px, 150px 150px;
  background-position: 0 0, 40px 60px, 130px 270px, 70px 100px;
  background-attachment: fixed;
}

#content_console {
  flex-direction: column;
  align-items: center;
}

#content_device, #content_device h3 {
  color: white;
}

/* Terminal */
#content_console #term{
  background: linear-gradient(135deg, #8e44ad, #3498db);
  margin: .75rem 0;
  overflow: visible;
  border-radius: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(142, 68, 173, 0.5), 0 0 30px rgba(52, 152, 219, 0.5);
  border: 5px solid #fff;
  position: relative;
  padding: 1em;
}

#content_console #term::before {
  content: '✨';
  position: absolute;
  top: -20px;
  left: -20px;
  font-size: 2.5em;
  text-shadow: 0 0 10px #fff, 0 0 20px #ffdd57, 0 0 30px #ffdd57;
}

#content_console #term::after {
  content: '🚀';
  position: absolute;
  bottom: -25px;
  right: -20px;
  font-size: 2.5em;
  transform: rotate(-25deg);
  text-shadow: 0 0 10px #fff, 0 0 20px #ff5757, 0 0 30px #ff5757;
}

#languageIcon {
  display: inline-flex;
  align-items: center;
  border: none;
  opacity: 0.8;
  margin: .5rem 0;
}

#content_console #term.on{
  box-shadow: 0 0 25px rgba(255, 105, 180, 0.9), 0 0 45px rgba(137, 207, 240, 0.9), 0 0 10px #fff inset;
}
#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);
}
#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 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;
  border-right: 1px solid #ccc;
}
#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: monospace;
}
#fileTemplate > div, #blocks2Code > div  {
  align-items: center;
  word-break: break-word;
  font-family: monospace;
}
#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 #7b49ad;
  border-radius: .75rem;
  padding: .175rem .25rem;
  color: #7b49ad;
  margin-left: .25rem;
  font-weight: bold;
  word-break: keep-all;
  font-family: sans-serif;
}
#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 {
    box-shadow: 0 0.125em 0.25em rgba(0,0,0,0.2);
    background: #3298dc;
    color: #fff;
    border-color: #3298dc;
}
#ProjectList .current span {
  filter: invert(1);
}

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

/* Sprited icons. */

button.icon:before, #deviceSelect.icon:before, a.icon:before, span.icon:before, label.icon:before {
  content:"";
  background-size: cover;
  background-image: url(../assets/icons/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;
}
#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;
}
#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;
}

/* White icons */
#notificationButton,
#accountButton,
#newProjectButton,
#saveButton,
#loadButton,
#forumButton,
#connectButton,
#serialButton,
#connectButton:before {
  background-position: left calc(-1.5rem*13) top;
}
#connectButton.on:before {
  background-position: left calc(-1.5rem*13) bottom;
}
#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;
  }
}

/* Device selector */
#deviceSelect {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--bitdoglab-tertiary);
  border-radius: 2rem;
  padding-left: .5rem;
  background-color: var(--bitdoglab-dark);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
#device_selector {
  appearance: none;
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-primary);
  font-size: inherit;
  line-height: inherit;
  height: 2rem;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  padding: 0 0.5rem;
}
#device_selector:focus {
  color: #000;
}
@media (max-width: 59.99em) {
  #device_selector {
    width: 13rem;
  }
}
/* Run button */
#runButton {
  border: none;
  border: 2px solid var(--bitdoglab-tertiary);
  margin: -1px;
  opacity: 1;
  padding: 0.25rem .4rem;
  background: var(--bitdoglab-accent);
  transition: all ease .2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
#runButton:hover {
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
  transform: translateY(-2px);
  background: var(--bitdoglab-success);
}

#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;
  }
}

/* Notifications */
.notify {
  z-index: 997;
	right: -18em;
  bottom:.5em;
	padding: 1em;
	position: fixed;
  box-shadow: 0 .125em .5em rgba(0,0,0,.6);
  background: #3298dc;
  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: 4rem;
}
.progress-bar#on {
	height: 1.2em;
	background-color: rgba(255,255,255,0.2);
}
.progress-bar div {
	content: '';
	position: absolute;
	height: 100%;
	background: var(--bitdoglab-accent);
	border-radius: 4px;
}
.progress-bar div{
	width: 0%;
	transition: .125s linear width;
}
.progress-bar .progress-text {
	position: absolute;
	width: 100%;
	text-align: center;
	line-height: 1.2em;
	color: #fff;
	font-size: 0.75em;
	font-weight: bold;
	text-shadow: 0 0 3px rgba(0,0,0,0.8);
	z-index: 1;
	pointer-events: none;
}
@-webkit-keyframes progress {
	0% {
		left: 100%;
		transform: translateX(0);
	}
	100% {
		left: 0;
		transform: translateX(-100%);
	}
}
@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;
}

/* Blockly toolbox */
.blocklyToolboxDiv {
  background: linear-gradient(135deg, #f0f9ff 0%, #e6e6fa 100%);
  border-right: 2px solid #d1c4e9;
  width: 300px;
}

.blocklyTreeRow {
  margin-bottom: 8px;
  border-radius: 20px;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  font-family: var(--font-primary);
  font-size: 1.1rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.blocklyTreeRow:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Category colors */
.blocklyTreeRow[aria-level="1"]:nth-child(odd) {
    background-color: #ffadad;
}
.blocklyTreeRow[aria-level="1"]:nth-child(even) {
    background-color: #ffd6a5;
}
.blocklyTreeRow[aria-level="1"]:nth-child(3n) {
    background-color: #fdffb6;
}
.blocklyTreeRow[aria-level="1"]:nth-child(4n) {
    background-color: #caffbf;
}
.blocklyTreeRow[aria-level="1"]:nth-child(5n) {
    background-color: #9bf6ff;
}
.blocklyTreeRow[aria-level="1"]:nth-child(6n) {
    background-color: #a0c4ff;
}
.blocklyTreeRow[aria-level="1"]:nth-child(7n) {
    background-color: #bdb2ff;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 140, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 140, 0, 0);
  }
}

.blocklyTreeSelected {
  border-color: var(--bitdoglab-accent) !important;
  animation: pulse 1.5s infinite;
}

.blocklyTreeLabel {
    color: #333;
    font-weight: bold;
}

.blocklyTreeSelected .blocklyTreeLabel {
    color: white !important;
}

/* Hide flyout label text */
.blocklyFlyoutLabelText {
  display: none;
}

/* Mutator icon */
.blocklyMutatorIcon image {
  transform-origin: center center;
  animation: pulse-mutator 2s infinite ease-in-out;
  cursor: pointer;
}

@keyframes pulse-mutator {
  0% {
    transform: scale(1.2);
  }
  50% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1.2);
  }
}
