html, body {
  touch-action: none; /* disables double-/triple-tap zoom on iOS */
  background-color: black;
  color: white;
  border: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
  overflow: hidden;
  position: absolute;
}

a {
  color: #DDF;
  -webkit-tap-highlight-color: rgba(0,0,0,0); /* Work around Safari leaving stuck tap highlights */
}
a:visited {
  color: #DBF;
}
#nowebgl {
  /* CANNOT have padding - messes up Safari when hidden! padding: 20px; */
  pointer-events: all;
}

#loading {
  background: #030303;
}

#content {
  display: block; /* remove scrollbars */
  overflow: hidden;
  width: 100%;
  height: 100%;
  position: absolute;
  pointer-events: none;
  left: 0;
  top: 0;
}

#safearea {
  display: block;
  overflow: hidden;
  border: 0;
  padding: 0;
  margin: 0;
  left: var(--discord-safe-area-inset-left, env(safe-area-inset-left));
  right: var(--discord-safe-area-inset-right, env(safe-area-inset-right));
  top: var(--discord-safe-area-inset-top, env(safe-area-inset-top));
  bottom: var(--discord-safe-area-inset-bottom, env(safe-area-inset-bottom));
  position: absolute;
  pointer-events: none;
}

canvas {
  display: block; /* remove scrollbars */
  width: 100%;
  height: 100%;
  outline: none;
}

#debug_overlay {
  left: 1%;
  top: 11%;
  position: fixed;
  white-space: pre-wrap;
  z-index: 99;
  background-color: rgba(1, 1, 1, 0.8);
}

.screenwrap {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.screenwrap .safearea {
  position:absolute;
  top: env(safe-area-inset-top);
  bottom: 0; /* avoid cutting the content before the end of the screen when scrolling */
  left: env(safe-area-inset-left);
  right: env(safe-area-inset-right);
}

.hflex {
  display: flex;
  flex-direction: row;
}

.vflex {
  display: flex;
  flex-direction: column;
}

.fluid {
  flex: 1;
}

.flexcenter {
  align-self: center;
}

#dynamic_text {
  left: 0;
  top: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block; /* remove scrollbars */
}

.glovui_dynamic {
  font-size: 1em;
  position: absolute;
  opacity: 1.0;
  pointer-events: auto;
}
.glovui_dynamic input,.glovui_dynamic textarea {
  font-size: 1em;
  line-height: 1em; /* fixes Firefox extra-tall lines in textareas */
  width: 100%;
  padding: 0;
  padding-left: 4px;
  margin: 0;
  box-sizing: border-box;
  background: white;
  border-width: 1px;
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

span:focus-visible {
  outline: none;
}

.glovui_dynamic .fixed {
  resize: none;
  overflow: hidden;
  text-wrap: nowrap;

  /* potentially useful for better blending if canvas_render is not an option:
    background: rgba(1,1,1,0);
    border: none;
    outline: none;
    color: #111;
    caret-color:  #111;
  */
}
.glovui_dynamic .canvas_render {
  resize: none;
  background: rgba(1,1,1,0);
  border: none;
  outline: none;
  overflow: hidden;
  text-wrap: nowrap;

  color: rgba(0,0,0,0);
  caret-color: rgba(0,0,0,0);
  /* debug alignment: color: rgba(255,0,255,0.5); */
  /* debug alignment: caret-color: rgba(255,0,255,0.5); */
}
.glovui_dynamic .canvas_render::selection {
  color: rgba(0,0,0,0);
}

.glovui_link {
  display: block;
  height: 100%;
  user-drag: none;
}

#loading {
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: contain;
}

#feedback {
  overflow: auto;
  background-color: white;
  color: black;
  pointer-events: auto;
}
#feedback a, #feedback a:visited {
  color: #00F;
}
#feedbacktext {
  width: 100%;
  box-sizing: border-box;
}

#iframecontainer {
  overflow: auto;
  background-color: #111;
  color: black;
  pointer-events: auto;
}

.codeeditor {
  position: absolute !important;
  pointer-events: auto;
}
.codeeditorchild {
  width: 100%;
  height: 100%;
}

.ios12_iframe_scrollfix {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

#iframe, .ios12_iframe_scrollfix {
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  z-index: 0;
}

#iframecancel {
  position:absolute;
  padding: 0px 16px;
  top:0;
  right:0;
  z-index: 1;
  font-weight: bold;
  font-size: 48px;
  border-radius: 8px;
  border: 2px solid #FFF;
  background-image: linear-gradient(#EEE, #888);
}

#iframecancel:hover {
  border: 2px solid #DDD;
  background-image: linear-gradient(#CCC, #666);
}

div#ot-sdk-btn-floating {
  display: none !important;
}
