@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Quicksand&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');/*Ubuntu Font*/
/*Ubuntu Font Weight:
- Light: 300
- Regular: 400
- Medium: 500 
- Bold: 700
*/
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&display=swap');/*Montserrat Font*/
/*Montserrat Font Weight:
- Thin: 100
- Extra Light: 200
- Light: 300
- Regular: 400
- Medium: 500 
- Semi Bold: 600 
- Bold: 700 
- Extra Bold: 800 
- Black: 900 
*/

*{
    margin: 0;
    padding: 0;
}

#inputs-header{
    width: 100%;
    display: flex;
    flex-flow: wrap;
    margin-top: 100px;
    margin-bottom: 30px;
}

#inputs-header input{
    width: 70%;
    height: 35px;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    border: none;
    outline: none;
    border-bottom: 1px solid #333;
    font-size: 1.2em;
}

.toolbar{
    background: #efefef;
    padding-bottom: 5px;
    border-radius: 20px;
    border:1px solid #ddd;
    width: 70%;
    margin-left: auto;
    margin-right: auto;
    transition: 0.3s;
/*
    position: fixed;
    left: 50%;
    transform: translate(-50%);
*/
}

.tool-list {
  display: flex;
  flex-flow: wrap;
  list-style: none;
  padding: 0;
  margin: 1rem;
  overflow: hidden;
  border-radius: 10px;
}

.tool-list p {
    width: 100%;
    padding-left: 15px;
    font-family: 'Ubuntu',sans-serif;
    font-weight: bold;
    color: #222;
}

.tool-list li button {
    background-color: #fff;
    color: #333;
    margin: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 50px;
    height: 50px;
    cursor: pointer;
}


.tool-list li button:hover {
    background-color: #eee;
    color: #222;
}

.tool--btn {
  display: block;
  border: none;
  padding: 0.5rem;
  font-size: 20px;
}

#output {
width: 70%;
  min-height: 400px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin: 1rem;
  padding: 1rem;
  outline: none; 
    margin-left: auto;
    margin-right: auto;
/*    margin-top: 300px;*/
}


#output div, #output p{
    width: 100%;
}

#output ol, #output li{
    margin-left: 10px;
}

#output img{
    width: 60%;
    margin-top: 30px;
    margin-bottom: 30px;
}

@media (max-width:800px){
    #output img{
        width: 100%;
    }
}



#fuentes{
    margin-top: 35px;
    margin-left: -38px;
    position: absolute;
    /*display: inline-flex;*/
    width: 150px;
    flex-direction: column;
    display: none;
}

#fuentes div{
    height: 45px;
    font-size: 0.9em;
    border:1px solid #ddd;
    background-color: #fafafa;
    text-align: left;
    display: flex;
    padding-left: 10px;
    align-items: center;
}

#fuentes div::before{
    font-size: 0.8em;
    color: #888;
}

#fuentes div:hover{
    cursor: pointer;
    background-color: #ccc;
}

#tm{
    margin-top: 35px;
    margin-left: -38px;
    position: absolute;
/*    display: inline-flex;*/
    width: 150px;
    flex-direction: column;
    display: none;
}

#tm div{
    height: 45px;
    font-size: 0.9em;
    border:1px solid #ddd;
    background-color: #fafafa;
    text-align: left;
    display: flex;
    padding-left: 10px;
    align-items: center;
}

#tm div::before{
    font-size: 0.8em;
    color: #888;
}

#tm div:hover{
    cursor: pointer;
    background-color: #ccc;
}

#cancelar-borradores{
    width: 150px;
    height: 40px;
    border-radius: 25px;
    background-color: orangered;
    color: #fff;
    position: fixed;
    font-weight: bold;
    font-size: 1.4em;
    display: none;
/*    display: flex;*/
    align-items: center;
    align-content: center;
    justify-content: center;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 2;
}

#buscar-borradores{
    width: 150px;
    height: 40px;
    border-radius: 25px;
    background-color: dodgerblue;
    color: #fff;
    position: fixed;
    font-weight: bold;
    font-size: 1.4em;
    display: none;
/*    display: flex;*/
    align-items: center;
    align-content: center;
    justify-content: center;
    bottom: 20px;
    right: 200px;
    cursor: pointer;
    z-index: 2;
}

#lista-borradores{
    position: fixed;
    top: 0;
    backdrop-filter: blur( 4px );
    -webkit-backdrop-filter: blur( 4px );
    display: none;
    flex-flow: wrap;
/*    display: flex;*/
    align-content: flex-start;
    justify-content: center;
    align-items: center;
    overflow-y: scroll;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
}

.borrador-container {
    padding: 20px;
   height: max-content;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 10px;
    width: 50%;
    margin: 10px;
}

.borrador-container a{
    font-weight: bold;
}

.borrador-container button{
    padding: 5px;
    width: 150px;
    margin: 10px;
    cursor: pointer;
}

.borrador-container p b{
    font-size: 1.1em;
}

.borrador-container p div{
    margin: 10px;
    
}

#fondo-code{
   position: fixed;
    top: 0;
    backdrop-filter: blur( 4px );
    -webkit-backdrop-filter: blur( 4px );
    display: none;
    flex-flow: wrap;
/*    display: flex;*/
    align-content: center;
    justify-content: center;
    align-items: center;
    overflow-y: scroll;
    width: 100%;
    height: 100%;
    background-color: rgba(100,100,100,0.8);
}

#code-box{
    background: #fff;
    width: 800px;
    height: 600px;
    overflow-y: scroll;
    border-radius: 10px;
    outline: none;
    padding: 20px;
}

#botones-html{
    width: 100%;
    display: flex;
    flex-flow: wrap;
    justify-content: center;
}

#botones-html div{
    width: 150px;
    height: 40px;
    border-radius: 25px;
    color: #fff;
    font-weight: bold;
    background-color: dodgerblue;
    font-size: 1em;
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    margin: 10px;
}

#botones-html div:first-child{
    background-color: orangered;
}

#botones-html div:last-child{
    background-color: yellowgreen;
}
/* ===== Modernización visual (2026): sin cambios en la lógica original ===== */
:root { color-scheme: light; --page:#f5f5f5; --surface:#fff; --soft:#fafafa; --line:#dedede; --ink:#222; --muted:#666; --hover:#ebebeb; }
*,*::before,*::after { box-sizing:border-box; }
body { background:var(--page); color:var(--ink); font-family:'Ubuntu',Arial,sans-serif; line-height:1.5; }
#inputs-header { width:min(1100px,calc(100% - 40px)); margin:42px auto 22px; gap:12px; }
#inputs-header input { width:100%; margin:0; height:48px; padding:0 16px; background:var(--surface); border:1px solid var(--line); border-radius:8px; font:400 16px 'Ubuntu',Arial,sans-serif; transition:border-color .15s; }
#inputs-header input:first-child { height:56px; font-size:21px; font-weight:500; }
#inputs-header input:focus { border-color:#888; outline:2px solid #e5e5e5; outline-offset:1px; }
#inputs-header input::placeholder { color:#888; }
.toolbar { width:min(1100px,calc(100% - 40px)); padding:8px 12px; background:var(--surface); border:1px solid var(--line); border-radius:10px; box-shadow:0 2px 12px rgba(0,0,0,.035); transition:none; }
.tool-list { margin:0; padding:0; gap:3px; overflow:visible; border-radius:0; align-items:center; }
.tool-list > p { width:100%; padding:12px 6px 7px; margin:0; font-size:12px; letter-spacing:.055em; text-transform:uppercase; font-weight:700; color:var(--muted); }
.tool-list > p:not(:first-child) { margin-top:10px; padding-top:16px; border-top:1px solid #ededed; }
.tool-list li { list-style:none; position:relative; }
.tool-list li button { width:39px; height:39px; margin:2px; padding:0; display:flex; align-items:center; justify-content:center; border:1px solid transparent; border-radius:7px; background:#fff; color:#343434; font-size:17px; transition:background-color .15s,border-color .15s; }
.tool-list li button:hover { background:var(--hover); border-color:#dedede; color:#111; }
.tool-list li button:focus-visible { outline:2px solid #777; outline-offset:2px; }
.tool-list li button a { color:inherit; text-decoration:none; }
.tool-list input[type="color"] { width:39px; height:39px !important; margin:2px !important; padding:5px; border:1px solid var(--line) !important; border-radius:7px; background:#fff; }
#output { width:min(1100px,calc(100% - 40px)); min-height:520px; margin:20px auto 60px; padding:40px 48px; border:1px solid var(--line); border-radius:10px; background:#fff; color:#222; font-family:Arial,sans-serif; font-size:16px; line-height:1.65; box-shadow:0 3px 18px rgba(0,0,0,.035); overflow-wrap:anywhere; }
#output:focus { outline:1px solid #aaa; outline-offset:0; }
#output img { max-width:100%; height:auto; }
#output ol,#output ul { padding-left:24px; }
#output li { margin-left:0; }
#fuentes,#tm { z-index:20; margin-top:39px; margin-left:-10px; width:175px; padding:5px; background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:0 10px 24px rgba(0,0,0,.12); }
#fuentes div,#tm div { min-height:36px; height:auto; padding:7px 10px; background:#fff; border:0; border-radius:5px; font-size:13px; }
#fuentes div:hover,#tm div:hover { background:var(--hover); }
#lista-borradores,#fondo-code { z-index:100; background:rgba(245,245,245,.94); backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px); padding:25px 16px 85px; }
.borrador-container { width:min(720px,100%); margin:8px; padding:22px; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 3px 12px rgba(0,0,0,.04); }
.borrador-container button { width:auto; min-width:120px; padding:9px 14px; margin:10px 8px 0 0; border:1px solid #ccc; border-radius:6px; background:#fff; color:#222; font:inherit; }
.borrador-container button:hover { background:#eee; }
#cancelar-borradores,#buscar-borradores { height:42px; padding:0 18px; border-radius:7px; background:#333; color:#fff; font-size:14px; font-weight:500; box-shadow:0 3px 12px rgba(0,0,0,.12); }
#buscar-borradores { background:#666; }
#code-box { width:min(900px,100%); height:min(65vh,650px); padding:24px; border:1px solid #d5d5d5; border-radius:9px; background:#fff; color:#222; font:14px/1.6 Consolas,monospace; overflow:auto; }
#botones-html { gap:10px; }
#botones-html div,#botones-html div:first-child,#botones-html div:last-child { width:auto; min-width:130px; height:42px; margin:12px 0; padding:0 20px; border-radius:7px; background:#333; color:#fff; font-size:14px; font-weight:500; }
#botones-html div:first-child { background:#777; }
#botones-html div:last-child { background:#222; }
#botones-html div:hover { background:#555; }
@media(max-width:700px) { #inputs-header { margin-top:20px; } #inputs-header,.toolbar,#output { width:calc(100% - 24px); } .toolbar { padding:8px; } .tool-list li button { width:37px; height:37px; } #output { padding:22px 18px; min-height:420px; } #fuentes,#tm { margin-left:-30px; } }


/* Editor compacto, inspirado en la referencia (sin degradados). */
:root { --page:#fff; --surface:#fff; --soft:#f3f4f6; --line:#e0e2e5; --ink:#30343b; --muted:#6b7079; --hover:#e4e7ec; }
body { background:#fff; }
#inputs-header { width:min(1040px,calc(100% - 32px)); margin:24px auto 16px; gap:7px; }
#inputs-header input { border:0; border-radius:0; border-bottom:1px solid #ececec; padding:0 10px; height:40px; }
#inputs-header input:first-child { height:48px; }
.toolbar { width:min(1040px,calc(100% - 32px)); margin:0 auto; padding:7px 10px 6px; border:1px solid var(--line); border-bottom:0; border-radius:12px 12px 0 0; background:#f3f4f6; box-shadow:none; }
.tool-list { gap:2px 4px; align-items:center; }
.tool-list li button { width:35px; height:35px; margin:1px; background:transparent; border:0; border-radius:5px; font-size:15px; color:#6c717a; }
.tool-list li button:hover { background:#e4e7ec; border:0; color:#292d34; }
.tool-list li button:active,.tool-list li button.is-active { background:#dce3ef; color:#3e5d84; }
.tool-list li button:focus-visible { outline:2px solid #858b95; }
.tool-list li button a { font-size:inherit; }
.tool-list li.tool-secondary:first-of-type { border-left:1px solid #d6d9dd; }
.tool-list li.tool-secondary { opacity:.9; }
.tool-list input[type=color] { width:34px; height:34px !important; background:transparent; border:0 !important; }
#output { width:min(1040px,calc(100% - 32px)); margin:0 auto 48px; min-height:540px; padding:22px 18px; border:1px solid var(--line); border-radius:0 0 9px 9px; box-shadow:none; font-size:16px; line-height:1.6; }
#output:focus { outline:none; }
#fuentes,#tm { margin-top:34px; z-index:30; }
@media(max-width:700px){#inputs-header,.toolbar,#output{width:calc(100% - 16px)} #inputs-header{margin-top:12px} .toolbar{padding:6px} .tool-list{gap:2px} .tool-list li button{width:32px;height:33px;font-size:14px} #output{padding:18px 14px;min-height:440px}}

/* Refinamiento: editor como única superficie visible, sin cabecera de metadatos */
#inputs-header { display:none !important; }
.toolbar { margin-top:28px !important; }
.tool-list .tool--btn .fas,.tool-list .tool--btn .fab { font-size:14px; font-weight:900; }
.tool-list .tool--btn { color:#555; }
.tool-list .tool--btn:hover { color:#171717; }
#lista-borradores .fas { margin-right:6px; }
@media(max-width:700px){.toolbar{margin-top:12px !important}}
