html { }
body {font-size:small; background-color: #333; font-family: Monaco, Lucida Console, monospace;}
.hordiv { width:80%; text-align: left; border-bottom:2px solid black;}
.code { font-family: Monaco, Lucida Console, monospace; }
.cmt { font-style: italic; color: blue;}
//pre { margin-top:0ex; margin-bottom:0.4ex; font-family: Monaco, Lucida Console, monospace;}
.highlight0 { border:none; background-color: transparent; }
.highlight1 { background-color: wheat; border: 1px dotted red; margin:-1px -1px -1px -1px; border-radius: 10px;}
.highlight2 { background-color: white; border: 2px solid red; margin:-2px -2px -2px -2px; border-radius: 5px;}
.highlight3 { background-color: yellow; border: 1px solid pink; margin:-1px -1px -1px -1px; border-radius: 3px;}

.srchl0 { border:none; background-color: transparent; }
.srchl1 { background-color: wheat; border: 1px dotted red; margin:-1px -1px -1px -1px; border-radius:5px;}
.srchl2 { background-color: white; border: 2px solid red; margin:-2px -2px -2px -2px;border-radius: 5px;}
.srchl3 { background-color: yellow; border: 1px solid pink; margin:-1px -1px -1px -1px; border-radius: 3px;}

.errorline { background-color: pink; }

.d1 { padding-right:0.5em; background-color: #f0f0f0; display:inline;}
.d0 { padding-right:0.5em; background-color: #e0ffff; display:inline;}

#header {
    font-family:Gill Sans, Franklin Gothic Medium, sans-serif;
    display: flex;
    background-color: #522;
    color:#ccc;
    padding:5px 5px 5px 5px;
    margin-left: -8px;
    margin-right: -8px;
    margin-top: -8px;
    border-bottom: 1px dotted #000;
    user-select:none;
    -moz-user-select: none;
    -khtml-user-select: none;
}

#header-text,
#header-text:visited {
    color: #ccc;
}
#header-link {
    font-size:125%;
    font-weight:bold;
    bottom: 5px;
    right: 0;
    width: max-content;
    text-align: right;
    margin-right: 1em;
    margin-left: 3em;
    margin-top: -2px;
    align-items: center;
    display: flex;
    flex-direction: column;
}
#header-right {
    padding-right: 1em;
    position: relative;
}

#stats {
    margin-top: 4px;
    font-size: small;
    font-weight: normal;
    width: 100%;
    text-align: left;
    padding: 0px 5px;
    padding-left: 5px
    margin-bottom: -4px;
    color: #777;
    transition: background-color 0.3s ease;
    position: relative;
    z-index: 0;
}

#stats.error {
    color: #bb5;
}

#stats.error:hover {
    color: white;
}

/* background layer */
#stats.error::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0px;
    right: 0;
    background: #f226;
    z-index: -1; /* stay behind text */
    transition: left 0.3s ease, background-color 0.3s ease;
}

/* expand background leftwards on hover */
#stats.error:hover::before {
    left: -5px; /* how much further you want it to grow */
    background: #f007;
}


#toolbar {
    float:right;
    font-family:Gill Sans, Franklin Gothic Medium, sans-serif;
    font-size:150%;
    font-weight:bold;
    background:transparent;
    color:white;
    padding:0px 1em 2px 1em;
    opacity:0;
    user-select:none;
    -moz-user-select: none;
    -khtml-user-select: none;
    display: none;
}

.baton { 
    cursor:pointer;
    font-family:Gill Sans, Franklin Gothic Medium, sans-serif;
    border: 1px solid black; 
    display: flex;
    font-weight:bold; 
    font-variant: small-caps;
    font-size: larger;
    letter-spacing: 0.4ex;
    padding-left:20px;
    padding-right:20px;
    padding-top:2px;
    padding-bottom: 0.25ex;
    color: #887;
    background-color: #111;
    margin-top:0.65ex;
    user-select:none;
    -moz-user-select: none;
    -khtml-user-select: none;
    border-radius: 5px;
    margin: 5px 5px;
}

.baton.project {
    letter-spacing: normal;
}

.baton:hover {
    color: #cc8;
    background: #333;
}

.baton.disabled {
    pointer-events: none;
    opacity: 0.5;
}

.baton-icon {
    font-size: small;
    margin-right: 8px;
    margin-left: -15px;
    flex-shrink: 0;
}
.baton-text {
    flex-grow: 1;
    text-align: center;
}


#textinput { 
    overflow:hidden;
    white-space:nowrap;
    display: block;
    width: 100%;
    position:relative;
}

//#source {
//    font-family:Monaco, Lucida Console, monospace; font-size:100%;
//    margin:0px 0px 0px 0px;
//    padding:0px 0px 0px 5px;
//    width:100%;
//    border: 1px solid black;
//    border-top: 1px dotted darkgray;
//}
#source { 
    //display: table-cell;
    //float:left;
    //width:39%;
    //direction:ltr;
    //height:100%;
    //display: table-cell;
    //height:80vh;
    margin:0;
    //position: absolute;
    //top: 0; bottom: 0; left: 0; right: 0;
}

#list {
    direction:ltr;
    float:right;
    border: 1px solid black;
    border-top: 1px dotted darkgray;
    vertical-align:top; width:40em; 
    padding-left:1ex;
    overflow:scroll;
    display:table-cell;
    width:40%;
    display:none;
}
.uarr1 {
    margin-top:-4px;
    margin-bottom:-4px;
    top:8px;
    font-family:monospace; font-size:90%; font-weight:bold; position:relative;
    color:#fff0f0;
    opacity:0;
}
.uarr2{
    margin-top:-4px;
    margin-bottom:-4px;
    top:2px;
    font-family:monospace; font-size:90%; font-weight:bold; position:relative;
    color:#ffa0a0;
    opacity:0.4;
}
.uarr3 {
    margin-top:-4px;
    margin-bottom:-4px;
    top:-1px;
    font-family:monospace; font-size:90%; font-weight:bold; position:relative;
    color:#b00000;
    opacity:0.8;
}
.darr1 {
    margin-top:-4px;
    margin-bottom:-4px;
    top:-6px;
    font-family:monospace; font-size:90%; font-weight:bold; position:relative;
    color:#fff0f0;
    opacity:0;
}
.darr2{
    margin-top:-4px;
    margin-bottom:-4px;
    top:0px;
    font-family:monospace; font-size:90%; font-weight:bold; position:relative;
    color:#ffa0a0;
    opacity:0.4;
}
.darr3 {
    margin-top:-4px;
    margin-bottom:-4px;
    font-family:monospace; font-size:90%; font-weight:bold; position:relative;
    top:2px;
    color:#b00000;
    opacity:0.8;
}

#backrefpopup {
    border:5px solid #ffff7d;
    background:#ffff7d;
    font-size:90%;
    font-family:Monaco, Lucida Console, monospace;
    opacity:0.9;
    max-width:30em;
    overflow:hidden;
}

.brmenuitem {
    padding-top:0.5ex;
    padding-bottom:0.5ex;
    padding-left:1em;
    padding-right:1em;
    background:transparent;
    cursor:pointer;
    user-select:none;
    -moz-user-select: none;
    -khtml-user-select: none;
}
.brmenuitem:hover {
    background:maroon;
    color:white;
}

span.l {
    cursor:default;
    font-weight:bold;
}

span.t1 {
    padding-right:1em;padding-left:0.4em;
    border-right:1px solid lightgray;
    cursor:pointer;
}
span.t2 {
    padding-right:1em;padding-left:0.4em;
    cursor:pointer;
}
span.t1:hover { background:#ffff7d; }
span.t2:hover { background:#ffff7d; }


#emulator {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    right: 0;
    display: none;
    z-index: 20;
}

#emulator:before {
    content: "#";
    background: black;
    opacity: 0.5;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

#emulator.visible {
    display: block;
}

#emulator-vert {
    position: relative;
    top: 2%;
}

#emulator-box {
    display: flex;
    flex-direction: column;
    max-width: 100vh;
    margin: auto;
    overflow: hidden;
    position: relative;
    box-shadow: 0px 0px 19px 9px rgba(0,0,0,0.75);
    border-radius: 10px;
}

#emulator-container {
    height: 75vh;
}

#emulator-iframe {
    width: 100%;
    height: 100%;
    border: 0px;
}

#emulator-controls {
    background: #223c;
    border-bottom: 1px dotted black;
    height: 18px;
    padding: 0px 0px;
    display: flex;
    align-items: center; // vertical
    overflow: hidden;
}

#ruslat {
    display: flex;
    font-weight: 900;
    color: #622;
    margin-left: 1ex;
    margin-right: 0.5ex;
    flex-shrink: 0;
}

#ruslat.on {
    color: #f30;
    text-shadow: 0px 0px 6px rgba(255, 100, 25, 1);
}

#emu-help {
    font-size: 8px;
    color: #887;
    display: flex;
    margin-left: 1em;
}

#emu-version {
    font-size: 8px;
    color: #887;
    margin-left: 1em;
    margin-right: 1em;
}

#emulator-controls #close {
    color: #999;
    padding-right: 1ex;
    padding-left: 1ex;
    padding-top: 4px;
    flex-shrink: 0;
    height: 100%;
    align-items: center;
}
#emulator-controls #close:hover {
    background-color: #a42;
    color: white;
}

span#wav-dl {
    font-size: smaller;
    color: #833;
    display: inline-block;
    transform: scaleX(2);
    //box-shadow: inset 0 0px 0 white, inset 0 -2px 0 #833;
    cursor: pointer;
}

span#wav-dl:hover {
    color: white;
    //box-shadow: inset 0 0px 0 white, inset 0 -2px 0 white;
}

#wav-play {
    font-size: smaller;
    color: #833;
    cursor: pointer;
}

#wav-play:hover {
    color: white;
}

#wav-emu {
    font-size: smaller;
    color: #833;
    cursor: pointer;
    letter-spacing: 0px;
}

#wav-emu:hover {
    color: white;
}

#wav-emu.disabled {
    pointer-events: none;
    opacity: 0.5;
}

#sounds {
    cursor:default;
}

.ryba-item {
    cursor: pointer;
    padding: 0.5em;
    margin: 0.5em;
}

#ryba-popup {
    border:5px solid #ffff7d;
    background:#ffff7d;
    font-size:90%;
    font-family:Monaco, Lucida Console, monospace;
    opacity:0.9;
    max-width:30em;
    overflow:hidden;
    position:fixed;
    z-index: 200;
    border-radius: .5rem;
}

.ryba-item:hover {
    background-color: maroon;
    color: white;
}

.error_marker {
    position: absolute;
    background: rgba(255,100,100,0.5);
    z-index: 20;
}


#buttons { padding:4px; background:#333; display: flex; }
.toolbar-btn { background:#182133; color:var(--fg); border:1px solid #2b3547; border-radius:.5rem; padding:.35rem .6rem; cursor:pointer; }
.toolbar-btn:hover { border-color:#3b4a62; }
.context-menu { background:#2b2b2b; border:1px solid #444; padding:4px 0; border-radius:4px; min-width:120px; font-size:13px; position:absolute; display:none; z-index:1000; }
.context-menu .menu-item { padding:4px 12px; cursor:pointer; color:#ddd; }
.context-menu .menu-item:hover { background:#444; }
.spacer { flex:1; }

.context-menu .menu-item::before {
    content: ''; /* Base content */
    display: inline-block;
    width: 1em; /* Consistent width */
    text-align: center; /* Center content */
    //vertical-align: middle; /* Align with text */
    line-height: 1.5em; /* Match your line height */
}

.context-menu .menu-item.checked::before {
    content: "☑";
    margin-right:5px;
}
.context-menu .menu-item.unchecked::before {
    content: "☐";
    margin-right:5px;
}

.context-menu .menu-item.checked-nobox::before {
    content: "✓";
    height: 1px;
    margin-right:5px;
}
.context-menu .menu-item.unchecked-nobox::before {
    content: '\00A0'; /* Nonbreaking space */
    margin-right:5px;
    height: 1px;
}

.menu-item.separator {
    height: 1px;
    background-color: black;
    padding: 0px;
    margin: 5px;
}

.tabbar {
    display:inline-flex; 
    background:transparent;
    padding:0px; 
    padding-left: 1em;
    margin-bottom: -5px;
    margin-top: 2ex;
    font-size: 0.75rem; 
    font-family: monospace;
    font-weight: normal;
}

.shawarma-menu {
    display: inline-block;
    padding: 6px 20px 6px 0px;
    transition: transform 0.2s ease;
    transform-origin: 30% 55%;
}
.shawarma-menu:hover {
    transform: scale(1.2);
}
 
.tab {
  position: relative;
  display: inline-block;
  padding: 6px 14px 6px 14px;
  margin-right: -2px; /* overlap borders */
  background: var(--tab-bg);
  color: white;
  border: 0px;
  border-top: 1px solid rgba(0, 0, 0, 0.5);
  font-family: sans-serif;
  line-height: 1.2;
  z-index: var(--tab-z);
  transition: background-color 0.3s ease;
}

.tab:hover {
    background: color-mix(in srgb, var(--tab-bg) 80%, var(--tab-bg-full));
}
.tab:hover::before {
    background: color-mix(in srgb, var(--tab-bg) 80%, var(--tab-bg-full));
}
.tab:hover::after {
    background: color-mix(in srgb, var(--tab-bg) 80%, var(--tab-bg-full));
}

/* slant left */
.tab::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -10px;
  width: 18px;
  height: 100%;
  background: var(--tab-bg);
  border: 0px;
  border-radius: 5px 0px 0px 0px;
  border-left: 1px solid rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(0, 0, 0, 0.5);
  transform: skewX(-20deg);
  z-index: var(--tab-z-1);
  transition: background-color 0.3s ease;
}

/* slant right */
.tab::after {
  content: "";
  position: absolute;
  top: -0px;
  right: -10px;
  width: 18px;
  height: 100%;
  background: var(--tab-bg);
  border: 0px;
  border-right: 1px dotted black;
  border-radius: 0px 5px 0px 0px;
  z-index: var(--tab-z);
  transform: skewX(20deg);
  transition: background-color 0.3s ease;
}

/* slant right */
.tab-shadow {
  content: "";
  position: absolute;
  top: -0px;
  right: -11px;
  width: 10px;
  height: 100%;
  background: #000;
  border: 0px;
  z-index: var(--tab-z);
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}
 
 
.tab.active {
    z-index: 100;
}
.tab.active::before {
    z-index: 100;
}
.tab.active::after {
    z-index: 100;
}

.resources-icon {
    transform: scaleX(2.5);
    display: inline-block;
}

#buttons-below {
    display: flex;
}

.ace_fish {
}

.ace_editor.cursor-default,
.ace_editor.cursor-default .ace_scroller,
.ace_editor.cursor-default .ace_content,
.ace_editor.cursor-default .ace_text-layer,
.ace_editor.cursor-default .ace_text-input {
      cursor: default !important;
  }

.bobinage-icon {
    display: inline-block;
    white-space: nowrap;
}
.bobinage-mid {
    margin-left: -0.25em;
    margin-right: -0.25em;
}

.reel {
    display: inline-block;
    //font-size: 100px;
    width: 1.2em;      /* add padding to even out bounding box */
    height: 1.2em;
    line-height: 1.2em;
    text-align: center;
    animation-play-state: paused;
    transform-origin: 50% 50%; 
}

.reel.bobinage {
    animation: bobinage 2s linear infinite;
}

@keyframes bobinage {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes bobinage {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

#right-tabbar {
    display: none;
}
