html, body {
  height: 100%;
}

body {
  background-color: #fff;
  font-family: sans-serif;
  margin: 0;
  overflow: hidden;
}

.farSide {
  text-align: right;
}

html[dir="RTL"] .farSide {
  text-align: left;
}

/* Buttons */
button {
  margin: 5px;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #ddd;
  font-size: large;
  background-color: #eee;
  color: #000;
}
button.primary {
  border: 1px solid #dd4b39;
  background-color: #dd4b39;
  color: #fff;
}
button.primary>img {
  opacity: 1;
}
button>img {
  opacity: 0.6;
  vertical-align: text-bottom;
}
button:hover>img {
  opacity: 1;
}
button:active {
  border: 1px solid #888 !important;
}
button:hover {
  box-shadow: 2px 2px 5px #888;
}
button.disabled:hover>img {
  opacity: 0.6;
}
button.disabled {
  display: none;
}
button.notext {
  font-size: 10%;
}

h1 {
  font-weight: normal;
  font-size: 140%;
  margin-left: 5px;
  margin-right: 5px;
}

/* Tabs */
#tabRow>td {
  border: 1px solid #ccc;
  border-bottom: none;
}
td.tabon {
  border-bottom-color: #ddd !important;
  background-color: #ddd;
  padding: 5px 19px;
}
td.taboff {
  cursor: pointer;
  padding: 5px 19px;
}
td.taboff:hover {
  background-color: #eee;
}
td.tabmin {
  border-top-style: none !important;
  border-left-style: none !important;
  border-right-style: none !important;
}
td.tabmax {
  border-top-style: none !important;
  border-left-style: none !important;
  border-right-style: none !important;
  width: 99%;
  padding-left: 10px;
  padding-right: 10px;
  text-align: right;
}
html[dir=rtl] td.tabmax {
  text-align: left;
}

table {
  border-collapse: collapse;
  margin: 0;
  padding: 0;
  border: none;
}
td {
  padding: 0;
  vertical-align: top;
}
.content {
  visibility: visible;
  margin: 0;
  padding: 0;
}

#content_blocks {
  width: 100%;
  height: 100%;
  padding: 0;
  background: #f9f9f9;
}

.blocklySvg {
  border-top: none !important;
}

#content_xml {
  resize: none;
  outline: none;
  border: 1px solid #ccc;
  font-family: monospace;
  overflow: scroll;
  visibility: hidden;
  position: absolute;
}

#code_container #content_c {
  flex: 1;
  overflow: auto;
  padding: 10px;
  margin: 0;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre;
  visibility: visible !important;
  display: block;
  border: none;
  background: white;
}

#code_container #content_c[contenteditable="true"] {
  background-color: #fffef0;
  cursor: text;
}

#code_container #content_c[contenteditable="true"]:focus {
  outline: 2px solid #1976D2;
}

#code_toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
#languageMenu {
  vertical-align: top;
  margin-left: 15px;
  margin-right: 15px;
  margin-top: 15px;
}

/* Buttons */
button {
  padding: 8px 15px;
  margin: 5px;
  border: none;
  border-radius: 5px;
  background-color: #4CAF50;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

button:hover {
  background-color: #45a049;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Sprited icons. */
.icon21 {
  height: 21px;
  width: 21px;
  background-image: url(icons.png);
}
.trash {
  background-position: 0px 0px;
}
.link {
  background-position: -21px 0px;
}
.run {
  background-position: -42px 0px;
}

/* Toolbar styles */
.toolbar {
  margin: 10px 0;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 5px;
}

/* Button color variations */
.btn-download {
  background-color: #2196F3;
}
.btn-download:hover {
  background-color: #0b7dda;
}

.btn-save {
  background-color: #4CAF50;
}
.btn-save:hover {
  background-color: #45a049;
}

.btn-load {
  background-color: #FF9800;
}
.btn-load:hover {
  background-color: #e68900;
}

.btn-clear {
  background-color: #f44336;
}
.btn-clear:hover {
  background-color: #da190b;
}

/* Header improvements */
h1 {
  color: #333;
  margin: 15px 5px;
  font-size: 24px;
}
