/* static/app/prompts/crear.css */


/* =========================================================
   WORKSPACE · BASE + SCROLL
   ========================================================= */

.workspace{
    display:flex;
    align-items:stretch;
    height:100%;
    width:100%;
    overflow:hidden;
}


/* =========================================================
   ZONA ACCIÓN
   ========================================================= */

.accion{
    flex-basis:50%;
    min-width:0;

    display:flex;
    flex-direction:column;

    height:100%;
    overflow:hidden;   /* 👈 CLAVE */
}

/* separación entre ítem y botones */
.accion-scroll{
    flex:1;
    overflow-y:auto;

    padding:16px;
    padding-bottom:32px; /* aire abajo */
}

.accion-footer{
    border-top:1px solid #d0c8bb;

    padding:20px 16px;
    background:#e7e3da;

    display:flex;
    align-items:center;
    gap:16px;

    flex-shrink:0;
    justify-content:flex-start;

    box-shadow:0 -2px 6px rgba(0,0,0,0.03);
}

/* =========================================================
   ZONA RESULTADO
   ========================================================= */

.resultado{
    display:flex;
    flex-direction:column;
    height:100%;
    overflow:hidden;

    scrollbar-width:none;

    flex-basis:50%;
    min-width:0;
    padding:16px;
    box-sizing:border-box;
}

.resultado::-webkit-scrollbar{
    display:none;
}

.resultado-wrapper{
    display:flex;
    flex-direction:column;
    height:100%;
    min-height:0;

    overflow:visible;
}

.resultado-body{
    flex:1;
    min-height:0;

    overflow-y:auto;
    overflow-x:hidden;

    scrollbar-gutter:stable;

    padding-right:2px;

    font-family:"Inter", sans-serif;
    font-size:13px;
    line-height:1.6;
    color:#2c3c3d;
}


/* Cargador */
.spinner{
    width:28px;
    height:28px;
    border:3px solid #ddd;
    border-top:3px solid #92180b;
    border-radius:50%;
    animation:spin 1s linear infinite;
    margin:20px auto;
}

@keyframes spin{
    to{ transform:rotate(360deg); }
}


/* RESULTADO · INFO: "el tiempo puede variar... " */

.resultado-header{
    display:flex;
    align-items:center;
    gap:10px;
}

.resultado-info{
    font-size:11px;
    color:#8a8375;
    font-style:italic;
}



/* párrafos dentro del resultado */
.resultado-body p{
    margin-bottom:10px;
}

/* si viene texto plano (sin <p>) */
#resultado{
    white-space:pre-line;
}


/* RESULTADO · BOTONES */

.resultado-actions{
    flex-shrink:0;       /* 👈 evita que se muevan */
    height:46px;
    padding-top:16px;
    display:flex;
    justify-content:center;
}

/* contenedor de botones */
.botones-secundarios{
    opacity:1;
    pointer-events:auto;
    transition:opacity 0.15s ease;

    display:flex;
    gap:16px;
}

.botones-secundarios.mostrar{
    opacity:1;
    pointer-events:auto;
}

.botones-secundarios button:disabled{
    opacity:0.5;
    cursor:not-allowed;
}

/* botones */
.btn-compartir,
.btn-guardar{
    background:#c48a38;
    color:white;
    border:none;
    border-radius:6px;

    font-family:"Inter", sans-serif;
    font-size:12.5px;
    font-weight:500;

    width:110px;        /* 🔴 mismo ancho */
    height:30px;        /* 🔴 misma altura */

    padding:6px 12px;
    cursor:pointer;

    transition:all 0.15s ease;

    display:flex;
    align-items:center;
    justify-content:center;

    gap:6px;
    overflow:hidden;
}

/* estado éxito */
.btn-ok{
    background:#375e65 !important;
}

.btn-ok::after{
    content:" ✔";
}


/* hover */
.btn-compartir:hover,
.btn-guardar:hover{
    background:#a8732f;
}

/* activo */
.btn-compartir:active,
.btn-guardar:active{
    transform:scale(0.97);
}

.btn-compartir:focus,
.btn-guardar:focus,
.btn-compartir:focus-visible,
.btn-guardar:focus-visible{
    outline:none;
    box-shadow:none;
}

/* 🔥 EVITA CAMBIO DE MÉTRICAS EN CLICK */

.btn-compartir,
.btn-guardar{
    border:1px solid transparent; /* 👈 fija layout */
}

/* =========================
   SCROLL RESULTADO (IGUAL QUE ACCIÓN)
========================= */
.resultado-body::-webkit-scrollbar{
    width:6px;
}

.resultado-body::-webkit-scrollbar-thumb{
    background:#c8c1b4;
    border-radius:4px;
}

.resultado-body::-webkit-scrollbar-thumb:hover{
    background:#a89f8d;
}

.resultado-body::-webkit-scrollbar-track{
    background:transparent;
}


/* =========================================================
   DIVIDER · UX MEJORADA
   ========================================================= */

.divider{
    width:6px;
    background:#d3cdc1;
    cursor:col-resize;
    flex-shrink:0;
    position:relative;
}

.divider::before{
    content:"";
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%);
    width:2px;
    height:40px;
    background:#a89f8d;
    border-radius:2px;
}

.divider:hover{
    background:#c5beaf;
}

.divider:hover::before{
    background:#375e65;
}

.divider:active{
    background:#b8b09f;
}


/* =========================================================
   BLOQUE · ESTRUCTURA INTERNA
   ========================================================= */

.bloque-body{
    display:flex;
    flex-direction:column;
    gap:18px;
}


/* =========================================================
   CAMPO PRINCIPAL (TEXTAREA)
   ========================================================= */

.campo-principal label{
    font-size:13px;
    font-weight:500;
    color:#375e65;
    letter-spacing:0.3px;
}

.campo-principal textarea{
    width:100%;
    max-width:640px;
    min-height:140px;
    resize:vertical;
    box-sizing:border-box;

    font-family:"Inter", sans-serif;
    font-size:13px;
    line-height:1.5;
    padding:12px;
    color:#2c3c3d;

    border-radius:6px;
    border:1px solid #cfc8bb;
    background:white;
}


/* =========================================================
   SUB BLOQUE (SELECTORES)
   ========================================================= */

.sub-bloque{
    width:100%;
    max-width:640px;
    padding:18px;
    border:1px solid #d6d0c4;
    border-radius:8px;
    box-sizing:border-box;

    display:flex;
    flex-direction:column;
    gap:14px;
}


/* labels */
.sub-bloque label{
    font-size:13px;
    color:#375e65;
}


/* selects */
.sub-bloque select{
    width:100%;
    max-width:100%;
    box-sizing:border-box;

    font-family:"Inter", sans-serif;
    font-size:13px;
    padding:8px 10px;
    color:#6f6f6f;

    border-radius:6px;
    border:1px solid #cfc8bb;

    background:white;
}

.sub-bloque select option{
    color:#2c3c3d;
}


/* =========================================================
   ESTADOS FOCUS (UNIFICADO)
   ========================================================= */

textarea:focus,
select:focus{
    outline:none;
    border:1px solid #375e65;
    box-shadow:0 0 0 2px rgba(55,94,101,0.15);
}


/* =========================================================
   ACCIONES DEL BLOQUE
   ========================================================= */

.bloque-actions{
    width:100%;
    max-width:640px;
    display:flex;
    justify-content:flex-start;
    gap:16px;
}

/* separación clara antes de los botones */
.bloque-actions{
    margin-top:28px; /* 🔴 aquí está la clave */
}


/* =========================================================
   TÍTULOS
   ========================================================= */

.bloque-header h2{
    font-size:15px;
    letter-spacing:1px;
    color:#375e65;
    margin-bottom:18px;
}


/* =========================================================
   BOTONES (BASE)
   ========================================================= */

/* =========================================================
   BOTÓN PRIMARIO (GENERAR)
   ========================================================= */

.btn-primario{

    width:250px;
    background:#92180b;
    color:white;
    border:none;

    padding:10px 18px;
    min-width:180px;

    border-radius:6px;

    font-weight:600;
}

/* hover */
.btn-primario:hover{
    background:#7a1409;
}

/* =========================================================
   BOTÓN SECUNDARIO (REINICIAR)
   ========================================================= */

.btn-secundario{
    background:#ded8cc;
    color:#2c3c3d;

    border:1px solid #d0c8bb;

    padding:8px 14px;
    border-radius:6px;
}

/* hover */
.btn-secundario:hover{
    background:#dcd6ca;
}



.btn-primario,
.btn-secundario{
    font-family:"Inter", sans-serif;
    font-size:13px;
    font-weight:500;
    letter-spacing:0.3px;
    padding:8px 12px;

    border-radius:6px;
    border:1px solid transparent;
    cursor:pointer;
}


/* =========================================================
   CAMPOS GENERALES
   ========================================================= */

.campo{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.campo label{
    display:block;
}

.campo textarea,
.campo select{
    display:block;
}


/* =========================================================
   SCROLLBAR (SUTIL)
   ========================================================= */

/* SCROLL UNIFICADO */

.accion-scroll::-webkit-scrollbar{
    width:6px;
}

.accion-scroll::-webkit-scrollbar-thumb{
    background:#c8c1b4;
    border-radius:4px;
}

.accion-scroll::-webkit-scrollbar-thumb:hover{
    background:#a89f8d;
}



/* =========================================================
   TABS
   ========================================================= */
   
.tabs a{
    text-decoration:none;
    color:#375e65; /* 👈 verde PQIA */
    font-size:14px;
    padding:6px 12px;
    border-radius:6px;
    font-weight:500;
    transition:all 0.15s ease;
}

/* ESPACIADO ENTRE TABS */
.tabs{
    display:flex;
    gap:18px; /* 👈 aquí controlas separación */
}

/* HOVER */
.tabs a:hover{
    background:#f2efe9;
}

/* ACTIVO */
.tabs a.activo{
    background:#ded8cc;
    color:#375e65;
}

/* =========================================================
   🚫 BLOQUE LÍMITE (PROMPTS / EMAILS)
   ========================================================= */

.bloque-limite{
    background:#f3efe7;
    border:1px solid #e0d9cc;
    border-radius:10px;

    padding:20px;

    display:flex;
    flex-direction:column;
    gap:10px;

    text-align:left;
}

/* título */
.bloque-limite h3{
    font-size:15px;
    color:#375e65;
    margin:0;
}

/* texto */
.bloque-limite p{
    font-size:13px;
    color:#6b7c7d;
    margin:0;
}

/* botón upgrade _ plan */
.bloque-limite .btn-upgrade{

    /* 🔥 MISMO COMPORTAMIENTO QUE BOTÓN PRINCIPAL */
    width:220px; /* un poco más estrecho que generar */
    
    background:#c48a38; /* mostaza */
    color:white;
    border:none;

    border-radius:6px;

    font-family:"Inter", sans-serif;
    font-size:13px;
    font-weight:400;

    padding:0px 14px;   /* 🔥 más fino */
    height:32px;        /* 🔥 menos alto que el principal */

    cursor:pointer;
    transition:all 0.15s ease;

    line-height:1;

    display:flex;
    align-items:center;
    justify-content:center;

    /* 🔥 CENTRADO */
    margin:12px auto 0 auto;
}

/* hover */
.bloque-limite .btn-upgrade:hover{
    background:#a8732f;
}

/* active */
.bloque-limite .btn-upgrade:active{
    transform:scale(0.97);
}

/* =========================
   MODAL
========================= */

.modal-overlay{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;

    background:rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);

    display:flex;
    align-items:center;
    justify-content:center;

    z-index:999999;
}

.modal-box{
    background:#f6f3ed; /* mismo fondo que tu sistema */
    border:1px solid #d0c8bb;
    border-radius:16px;

    padding:24px 28px;

    max-width:420px;
    width:85%;

    text-align:center;

    font-family:"Inter", sans-serif;
    font-size:14px;
    color:#2c3c3d;

    box-shadow:0 12px 30px rgba(0,0,0,0.18);
}

.modal-box button{
    margin-top:16px;

    background:#92180b;
    color:white;
    border:none;

    padding:8px 16px;
    border-radius:6px;

    font-family:"Inter", sans-serif;
    font-size:13px;
    font-weight:500;

    cursor:pointer;
    transition:all 0.15s ease;
}

/* hover */
.modal-box button:hover{
    background:#7a1409;
}

/* click */
.modal-box button:active{
    transform:scale(0.97);
}

.modal-box p{
    margin:0;
    line-height:1.5;
}

