/*          General Styles          */



* {
  margin: 0;
  padding: 0;
}

html {
  overflow: hidden;
}

body {
  position: fixed; /* Prevents scrolling of content in IE. */
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: Window;
  color: WindowText;
  font: message-box; /* use system font */
  font-size: 80% !important; /* This overrides the font-size contained in the system font if it does not follow dpi settings. */
  cursor: default;
  user-select: none;
}

input, select, label {
  /*min-height: 1.2em;*/
  vertical-align: middle;
  /*padding: 0.25em;*/
  font: message-box; /* use system font */
  font-size: 100% !important; /* This overrides the font-size contained in the system font if it does not follow dpi settings. */
}

input[type=text], input[type=number] {
  cursor: auto;
}

input[type=text][disabled], input[type=number][disabled] {
  opacity: 0.5;
  filter: alpha(opacity = 50);
}

input[type=text].num, input[type=number] {
  text-align: right;
  width: 2.5em;
  padding-right: 0.75em;
}

button {
  font: message-box; /* use system font */
  font-size: 100% !important; /* This overrides the font-size contained in the system font if it does not follow dpi settings. */
  color: ButtonText;
  vertical-align: middle;
}

form {
  margin: 0;
  padding: 0;
}

.left {
  float: left;
}

.right {
  float: right;
}

.hide {
  display: none !important;
}

ul {
  list-style: none outside none;
  margin: 0;
  padding: 0;
}

ul li {
  display: block;
  margin: 0;
  padding: 0;
  clear: both;
}

table {
  border-spacing: 0;
  border-collapse: collapse;
}



/*          Individual Styles          */



#toolbar {
  position: absolute;
  width: 100%;
  height: 3em;
  line-height: 3em;
  border: 0;
  background: url('../images/toolbar-bg.png') 50% 50% repeat ButtonFace; /* ActiveCaption */
  border-bottom: ButtonShadow 1px solid;
  margin-top: -1px; /* to keep the bottom border visible */
  color: ButtonText;
  text-align: center;
}

#toolbar .left {
  position: absolute;
  top: 0;
  left: 0;
  margin-left: 0.5em;
}

#toolbar .right {
  position: absolute;
  top: 0;
  right: 0;
  margin-right: 0.5em;
}

#content {
  position: absolute;
  width: 100%;
  border: 0;
  top: 3em;
  bottom: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

#fake_gutter {
  width: 3em;
  z-index: 0;
}

/*          OUTPUT          */



#output {
  overflow: hidden;
  margin-top: -1px; /* Hide the first visible child's top border to avoid a double border. */
}

#output .message {
  position: relative;
  display: block;
  padding-left: 3em; /* 1.75em */
  min-height: 1em;
  overflow: visible;
}
#output .message.input, .message.result + .message, #input {
  border-top: 1px #ddd solid;
  border-top: 1px rgba(128, 128, 128, 0.2) solid;
}

#output .message .content {
  font-family: inherit;
  position: relative;
  padding-left: 4px; /* from ace_layer ace_text-layer */
}

#output .message .gutter {
  width: 3em; /* 1.75em */
  background-position: 50% -2px;
  background-repeat: no-repeat;
}
#output .message.input .gutter {
  background-image: url("../images/icon_input.png");
}
#output .message.result .gutter {
  background-image: url("../images/icon_result.png");
}
#output .message.error .gutter {
  background-image: url("../images/icon_error.png");
}
#output .message.stdout .gutter {
  background-image: url("../images/icon_puts.png");
}
#output .message.puts .gutter {
  background-image: url("../images/icon_puts.png");
}
#output .message.print .gutter {
  background-image: url("../images/icon_puts.png");
}

#output .message .counter {
  position: absolute;
  bottom: 0;
  right: 0;
  min-width: 1em;
  background: red;
  color: white;
  border-radius: 0.5em;
  text-align: center;
}

#output .message .time {
  position: absolute;
  right: 0;
  bottom: 0;
  color: GrayText;
  opacity: 0.5;
}

#output {
  overflow-x: auto;
}

#content.wrap_lines #output {
  white-space: pre-wrap;
  word-wrap: break-word; /* needs layout */
  zoom: 1; /* makes layout */
}



/*          INPUT          */



#input {
  overflow: hidden;
}



/*          ACE Tweaks          */



/* Hide line number for single lines. */
.ace_gutter-cell:first-child:last-child {
  visibility: hidden;
}

/* Reduce gutter width. */
.ace_gutter-layer {
  width: 3em !important; /* 1.75em */
}

.ace_gutter-cell {
  padding-left: 2px !important;
}

/* Hide scrollbar. */
.ace_scrollbar {
  display: none;
}

/* Additional highlighter class for ace/mode/ruby_sketchup */
.ace_sketchup {
  color: rgb(77, 82, 89);
}
.ace_dark .ace_sketchup {
  color: rgb(178, 173, 166);
}



/*          TOOLBAR          */



.button {
  min-width: 1.5em;
  min-height: 1.5em; /* TODO: maybe remove this */
  text-align: center;
  vertical-align: middle;
  line-height: 1em;
  margin-top: -2px;
  padding-top: 2px;
}

.button img, .button-menu img {
  width: 1.5em;
  height: 1.5em;
  margin: 0.25em;
}

.button-menu {
  display: inline-block;
}

.button-menu .menu-wrapper {
  display: none;
}

.icon {
  color: #4b4b4b;
}



/*          MENUS          */



.menu-wrapper {
  position: relative;
  z-index: 10;
  overflow: visible;
}

.left .menu {
  left: 0;
}

.right .menu {
  right: 0;
}

.menu {
  position: absolute;
  min-width: 10em;
  padding: 0.25em 1em;
  text-align: left;
  background: Menu;
  font: menu;
  font-size: 100% !important;
  color: MenuText;
  border: 1px solid ButtonShadow;
  box-shadow: 0 0.25em 1em 0 rgba(0, 0, 0, 0.25);
}

.menu li {
  position: relative;
  line-height: 1.5em;
  white-space: nowrap;
}

.menu hr {
  opacity: 0.5;
}

.menu li .button_remove {
  margin: 0.25em;
  width: 1.5em;
  height: 1.5em;
  line-height: 0.5em;
  visibility: hidden;
}

.menu li:hover .button_remove {
  visibility: visible;
}

.menu li input, .menu li select {
  margin-right: 0.5em;
}



/*          Collapsible Panel          */



.ui-widget-header {
  font-weight: bold;
}

.collapsible-panel {
  text-indent: 0 !important;
  margin: 0;
  clear: both;
  padding: 0;
  border: none;
}

.collapsible-panel .ui-widget-header {
  cursor: pointer !important;
}

.collapsible-panel .ui-widget-header:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border: 1px solid ThreeDShadow;
  margin: 0 0.5em;
  text-align: center;
  vertical-align: middle;
  background: transparent url('../images/minus.png') 50% 50% no-repeat;
}

.collapsible-panel.collapsed .ui-widget-header:before {
  background-image: url('../images/plus.png');
}

