html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

body.no-select {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}


body {
  background-color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  margin: 0;
  overflow: hidden;
  position: relative;

}

.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 #ddd;
  background-color: #eee;
  color: #000;
}
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: hidden;
  margin: 0;
  padding: 1ex;
  position: absolute;
  direction: ltr;
}
pre.content {
  border: 1px solid #ccc;
  overflow: scroll;
}
#content_blocks {
  padding: 0;
}
.blocklySvg {
  border-top: none !important;
}
#content_xml {
  resize: none;
  outline: none;
  border: 1px solid #ccc;
  font-family: monospace;
  overflow: scroll;
}
#languageMenu {
  vertical-align: top;
  margin-top: 15px;
  margin-right: 15px;
}

/* Buttons */
button {
  padding: 1px 10px;
  margin: 1px 5px;
}

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

:root {
  --md-width: 650px; /* Это ширина читалки по умолчанию */
  --md-header-height: 40px;
}

body.md-hidden {
  --md-width: 0px;
}

#content_area {
  width: calc(100% - var(--md-width));
}

.markdown-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--md-width);
  background: #fafafa;
  border-left: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

body.md-hidden .markdown-panel {
  width: 0;
  border-left: none;
}

.markdown-header {
  height: var(--md-header-height);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-bottom: 1px solid #ddd;
  background: #f0f0f0;
  box-sizing: border-box;
}

.markdown-title {
  font-size: 14px;
  font-weight: bold;
  margin-right: 6px;
}

#lessonMenu {
  flex: 1;
  min-width: 0;
}

.markdown-content {
  padding: 10px;
  overflow: auto;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
  margin: 10px 0 6px;
}

.markdown-content pre {
  background: #eee;
  padding: 8px;
  overflow: auto;
}

.markdown-content code {
  background: #eee;
  padding: 2px 4px;
}

/* Layout: keep workspace left of markdown panel */
body { position: relative; }

table {
  width: calc(100% - var(--md-width));
}

body.md-hidden table {
  width: 100%;
}

.markdown-panel {
  z-index: 5;
}

/* Resizable markdown panel */
.main-layout {
  display: flex;
  height: 100%;
  width: 100%;
  position: relative;
}

.workspace-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 300px;
}

.markdown-resizer {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  width: 6px;
  cursor: col-resize;
  background: #e0e0e0;
}

.markdown-resizer:hover {
  background: #cfcfcf;
}

.markdown-panel {
  position: relative;
  flex: 0 0 var(--md-width);
  width: var(--md-width);
}

body.md-hidden .markdown-panel {
  flex: 0 0 0;
  width: 0;
}

body.md-hidden .markdown-resizer {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  display: none;
}

/* Ensure workspace uses full width of its pane */
.workspace-wrap table {
  width: 100%;
}

#content_area {
  width: 100%;
}

#stopButton {
    appearance: none;
    -webkit-appearance: none;
    /*background-color: #ca3a3a;
    color: white;
    border: none;
    */
}


#execButton {
    appearance: none;
    -webkit-appearance: none;
    /*background-color: green;
    color: white;
    border: none;
    */
}


/* Blockly font overrides */
.blocklyTreeLabel,
.blocklyText,
.blocklyFlyoutLabelText,
.blocklyMainBackground,
.blocklyToolboxDiv,
.blocklyFlyout,
.blocklyWidgetDiv {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

.blocklyFlyout .blocklyDraggable > * {
    pointer-events: none !important;
}

.blocklyFlyout .blocklyDraggable {
    pointer-events: auto !important;
}
