* {
  box-sizing: border-box;
  font-size: 1.05rem;
}

body {
  margin: 0px;
  background-color: #EEE;
  color: #333;
  overflow: hidden;
}

:root {
  --heigh_header: 2.4rem;
  --heigh_main: calc(100vh - 2.4rem - 2px);
}

/* ========== botones =========== */

header {
  background-color: #EEE;
  border-bottom: 1px solid #aaa;
}

button {
  border: none;
  height: 2.2rem;
  cursor: pointer;
  border-radius: 6px;
  vertical-align: middle;
}

button:hover {
  color: #000;
  background-color: #ccc;
}

span#htmlCode {
  float: left !important;
  cursor: pointer;
  padding-top: 2px;
  /* Ojo con ponerlo a más de 3px que en el firefox empuja el main y salen mal las secciones */
  margin-right: -9px;
  margin-left: 6px;
  color: #54F;
  font-size: 1.6rem;
}

button[id^=tab] {
  margin-top: 2px;
  height: 2.2rem;
  font-size: 1.3rem;
  box-shadow: 1px 0px 3px 1px #BBB;
  border-radius: 7px 7px 0 0;
}

button#tabHtml {
  width: 3.9rem;
  margin-left: 15px;
}

button#tabCss {
  width: 3.3rem;
  margin-left: 1px;
}

button#tabJs {
  width: 2.9rem;
  margin-left: 1px;
}

button#Stack {
  margin: 1px 2px 2px 3px;
  padding: 5px 5px;
}

button#Run {
  color: #fff;
  background-color: #5B5;
  font-size: 2.3rem;
  line-height: 0;
  padding: 0px 14px;
  height: 2.3rem;
}
button#Run:hover {
  background-color: #fff;
  color: #394;
}

/* selector para librerías JS */
select[multiple] {
  position: absolute;
  z-index: 3;
  padding-top: 0px;
  margin: 6px 0 0 6px;
  height: 1.5rem;
  /* vertical-align: top; */
}
select[multiple]:focus,
select[multiple]:active {
  min-height: 17rem;
}

#progNameInput {
  background: #EEE;
  border: none !important;
  font-size: 0.96rem;
  color: #666;
  position: absolute;
  right: 8.5rem;
  top: 9px;
  max-width: 7rem;
}
#progNameInput:focus { outline: 1px solid #888; border-radius:3px; }

/* visualiza las dimensiones del iframe de resultados */
#framesize {
  float: right !important;
  padding: 8px 13px;
  font-family: monospace;
  color: #F66;
  word-spacing: -4px;
}

/* Ayuda */
#help {
  font-size: 1.1rem;
  position: relative;
  z-index: 2;
  background: #AAF5;
  border-radius: 6px;
  border: 1px solid #69B6;
  color: #36B;
  float: right;
  margin-top: 7px;
}

#tip_help {
  white-space: pre;
  font: 1rem Arial;
  border: #624 1px solid;
  padding: 6px;
  visibility: hidden;
  width: 400px;
  position: absolute;
  top: -1000px;
  left: -1000px;
  background-color: oldlace;
}

#tip_help tt {
  color: #00F;
  font: 1rem serif;
}

#tip_help span.alt {
  font: 1rem arial;
}

#tip_help span.alt tt {
  color: #070;
  font: 1rem serif;
}

/* ========== main =========== */

main {
  background-color: #f1f1f1;
  width: 100%;
  height: var(--heigh_main);
  top: var(--heigh_header);
  /* no sireve para nada, salvo para que funcione el redimensionado horizontal /**/
  /*border-top: 3px solid GREEN; /**/
  /* margin-top: 3px;  /* No vale para nada, sólo para que firefox ajuste bien el padding */
  /* border-top: none; */
  /* overflow: hidden; /**/
}

main.horizontal {}

/* ========== secciones ============ */

section {
  float: left;
  height: 100%;
  width: 50%;
  padding: 0 !important;
  /* border: 2px solid RED; padding: 0px; /**/
  /* overflow: hidden; /**/
}

section.horizontal {
  float: none;
  height: 100%;
  /* calc(50vh - 1.2rem); /**/
  width: 100%;
}

/* ---- division de editores e iframe ----- */


#divEditores {
  /* height: calc(100vh - 2.4rem);  /* Por javascript, porque al hacer el navegador pequeño y cambiar de pestaña, luego al no aumenta **/
  padding-left: 0px;
  padding-right: 5px;
  padding-bottom: 4px;
  padding-top: 1px;
  margin: 0 !important;
  height: 100%;
  /**/
  /* border: 6px solid BLUE; padding: 1px; /**/
  /* overflow-x: hidden; /**/
  /* overflow-y: hidden; /**/
}

#divIframe,
iframe {
  width: 100%;
  height: 100%;
}

#divIframe {
  padding: 1px 5px 4px 0;
  /* border: 6px solid YELLOW; /**/
}

#divEditores.horizontal {
  height: 100%;
  padding-left: 0;
  padding-right: 6px;
}

#divIframe.horizontal {
  height: 100%;
  padding-right: 6px;
  padding-bottom: 6px;
  padding-left: 0px;
}


/* ---- contenedor de iframe (navegador) ----- */

#contenedorIframe {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: #fff;
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.20), 0 1px 2px rgba(0, 0, 0, 0.25);
  /* border: 3px solid red; /**/
}

#contenedorIframe.horizontal {}

/* ... editores y navegador de visualización .... */

#editorHtml,
#editorCss,
#editorJs {
  width: 100%;
  height: 100%;
  /* border: none; */
  background-color: white;
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.20), 0 1px 2px rgba(0, 0, 0, 0.25);
  padding-right: 6px;
  /* border: 6px solid MAGENTA;  padding: 1px; /**/
  /* overflow-x: hidden; /**/
  /* overflow-y: hidden; /**/
}

#editorHtml.horizontal,
#editorCss.horizontal,
#editorJs.horizontal {
  width: 100%;
  height: 100%;
}

#navegador {
  border: none;
  /* border: 2px solid BLACK; /**/
}

/* .... CodeMirror ...... */
div.cm-editor {
  height: 100%;
  border: none;
  /* border: 3px DOTTED RED;  padding: 1px; /**/
  /* overflow: hidden; /**/
}

.cm-announced {}

div.cm-scroller {
  /* overflow-x: auto; */
  /* border: 2px solid blue;  padding: 1px;/**/
  /* overflow-y: scroll;	 /**/
}

div.cm-content[role="textbox"] {
  /* overflow: hidden; /**/
  /* border: 3px dashed blue;  padding: 1px; /**/
  /* background: TAN; /**/
}




/* .ͼi { color: blue; font-weight: bold; } /** h3 **/
/* .ͼc { color: #A11; } /** #big, .small **/
/* .ͼ1 { height: 101vh; } /**/
/* .ͼ1.cm-focused { outline: none; } /**/
/* ======= barra modificación tamaño ======== */

/* barrita que arrastramos */
#dragbar {
  position: absolute;
  z-index: 3;
}

/* área sobre la que se arrastra la barra dragbar */
#areaDragbar {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 4;
  /* border: 3px solid red;*/
}


/* ==== Menú configuración ==== */

form div {
  padding: 1rem;
  line-height: 1.6rem;
}

form menu {
  margin-top: -0.5rem;
}

input {
  font-size: 3rem;
}

input[type="checkbox"] {
  display: none;
  /* Oculta el checkbox nativo */
}

label {
  position: relative;
  padding-left: 30px;
  /* Espacio para el checkbox personalizado */
  cursor: pointer;
  font-size: 1.2rem;
}

label:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
}

input[type="checkbox"]+label {
  color: #888;
}

input[type="checkbox"]:checked+label {
  color: black;
}

input[type="checkbox"]:checked+label:before {
  background-color: #4CAF50;
  /* Color de fondo al estar seleccionado */
  border-color: #4CAF50;
}

input[type="checkbox"]:checked+label:after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid yellow;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

#optRecuperaLocalStorage,
#optBorraLocalStorage {
  font-size: 1rem;
  padding: 2px 5px;
  border-radius: 8px;
}

dialog {
  padding: 1rem;
  background: #FFFe;
}

#cancel,
#optBorraLocalStorage {
  color: #800;
  margin-left: 0.5rem;
  border: 1px solid #caa;
}

button[type="submit"],
#optRecuperaLocalStorage {
  color: green;
  margin-left: 0.5rem;
  border: 1px solid #ada;
}