/* static/app/emails/situaciones.css */

@import url("/static/app/prompts/crear.css");

/* =========================================================
   WORKSPACE
   ========================================================= */

.workspace{
    display:flex;
    height:100%;
    width:100%;
    overflow:hidden;
}

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

    box-sizing:border-box;

    display:flex;
    flex-direction:column;
    padding:0;
}

.accion-scroll{
    flex:1;
    overflow-y:auto;
    padding:16px 16px 32px 16px;
}

.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);
}

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

    padding:16px;
    box-sizing:border-box;

    display:flex;
    flex-direction:column;

    height:100%;
    overflow:hidden;
}

.divider{
    width:6px;
    cursor:col-resize;
    background:#d0c8bb;
}


/* =========================================================
   SCROLL ACCIÓN
   ========================================================= */

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

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

    box-shadow:
        inset 0 0 0 0 transparent,
        inset 0 8px 0 0 transparent,
        inset 0 10px 0 0 rgba(120,110,95,0.25),
        inset 0 12px 0 0 transparent;
}

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

.accion-scroll::-webkit-scrollbar-track{
    background:transparent;
}


/* =========================================================
   SCROLL RESULTADO
   ========================================================= */
#resultado{
    font-family:"Inter", sans-serif;
    font-size:13px;
    line-height:1.6;
    color:#2c3c3d;

    white-space:pre-wrap;

    padding:8px;
    padding-right:6px;

    max-width:100%;
}

.resultado-body{
    flex:1;
    overflow-y:hidden;
    padding-right:6px;
}

#resultado::-webkit-scrollbar{
    width:6px;
}

.resultado-body.con-scroll{
    overflow-y:auto;     /* ✅ scroll solo cuando toca */
}

#resultado::-webkit-scrollbar-thumb{
    background:#c8c1b4;
    border-radius:4px;
    min-height:40px;

    box-shadow:
        inset 0 0 0 0 transparent,
        inset 0 8px 0 0 transparent,
        inset 0 10px 0 0 rgba(120,110,95,0.25),
        inset 0 12px 0 0 transparent;
}

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

#resultado::-webkit-scrollbar-track{
    background:transparent;
}


/* =========================================================
   BLOQUE BASE
   ========================================================= */

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

.bloque-header{
    margin-bottom:4px;
}

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


/* =========================================================
   HEADER CON IDIOMA
   ========================================================= */

.header-con-idioma{
    display:flex;
    align-items:center;
    justify-content:space-between;
}


/* =========================================================
   SELECTOR IDIOMA
   ========================================================= */

.selector-idioma select{
    padding:6px 10px;
    border:1px solid #d0c8bb;
    border-radius:6px;
    background:#f6f3ed;

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

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

.selector-idioma select:hover{
    border-color:#375e65;
}

.selector-idioma select:focus{
    outline:none;
    border-color:#375e65;
    box-shadow:0 0 0 1px rgba(55,94,101,0.25);
}


/* =========================================================
   CATEGORÍAS
   ========================================================= */

.titulo-categoria-activa{
    font-size:14px;
    font-weight:600;
    color:#375e65;
    margin-bottom:10px;
}

.lista-categorias{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:12px;
}

.item-categoria{
    display:flex;
    flex-direction:column;
    justify-content:center;

    padding:12px 14px;
    border:1px solid #d0c8bb;
    border-radius:12px;

    background:#f6f3ed;
    box-shadow:0 1px 2px rgba(0,0,0,0.03);

    cursor:pointer;
    transition:all 0.2s ease;

    min-height:60px;
}

.item-categoria:hover{
    border-color:#375e65;
    background:#f2ede3;
    transform:translateY(-1px);
}

.item-categoria:active{
    transform:scale(0.98);
}

.categoria-titulo{
    font-size:13.5px;
    font-weight:500;
    color:#375E65;
}

.categoria-desc{
    font-size:11.5px;
    margin-top:3px;
    color:#2c3c3d;
}


/* =========================================================
   LISTA SITUACIONES
   ========================================================= */

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

.item-situacion{
    position:relative;

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

    padding:10px 12px;
    border:1px solid #d0c8bb;
    border-radius:10px;

    background:#f6f3ed;
    cursor:pointer;

    transition:all 0.18s ease;
}

.item-situacion:hover{
    border-color:#375e65;
    background:#f2ede3;
}

.item-situacion.activo{
    border-color:#375e65;
    background:rgba(55,94,101,0.12);
}

.situacion-titulo{
    font-size:13px;
    font-weight:500;
    color:#2c3c3d;
}

.situacion-desc{
    font-size:12px;
    color:#6b6b6b;
}


/* =========================================================
   SUBCONFIGURACIÓN
   ========================================================= */

.sub-configuracion{
    margin-top:8px;
    margin-left:16px;
    border-left:2px solid #d0c8bb;
    padding-left:12px;
}

.config-box{
    width:calc(100% - 16px);

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

    padding:12px;
    border:1px solid #d0c8bb;
    border-radius:10px;
    background:#f9f7f3;
}

.config-item{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.config-item label{
    font-family:"Inter", sans-serif;
    font-size:13px;
    font-weight:500;
    line-height:1.6;
    letter-spacing:0.15px;
    color:#375e65;

    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}

.config-item textarea,
.config-item input{
    padding:8px;
    border:1px solid #d0c8bb;
    border-radius:6px;

    font-size:13px;
    font-family:"Inter", sans-serif;
    line-height:1.6;
    letter-spacing:0.15px;

    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}

.config-item textarea{
    resize:none;
    min-height:70px;
}

.config-item textarea:focus,
.config-item input:focus{
    outline:none;
    border-color:#375e65;
    box-shadow:0 0 0 1px rgba(55,94,101,0.25);
}


/* =========================================================
   OPCIONES / CHIPS
   ========================================================= */

.opciones{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.opcion{
    padding:6px 10px;
    border:1px solid #d0c8bb;
    border-radius:20px;

    font-size:12px;
    cursor:pointer;
    background:#f1ede6;
}

.opcion:hover{
    border-color:#375e65;
}

.opcion.activa{
    border-color:#375e65;
    background:rgba(55,94,101,0.12);
    box-shadow:0 0 0 1px rgba(55,94,101,0.18);
    color:#2c3c3d;
    font-weight:500;
}


/* =========================================================
   BOTONES WORKSPACE
   ========================================================= */

.btn-primario{
    width:250px;
    min-width:180px;

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

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

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

    cursor:pointer;
}

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

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

    border:1px solid #d0c8bb;
    padding:8px 12px;
    border-radius:6px;

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

    cursor:pointer;
}

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

.accion-footer .btn-primario{
    width:250px;
}

.accion-footer .btn-secundario{
    width:auto;
}


/* =========================================================
   RESULTADO HEADER
   ========================================================= */

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

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


/* =========================================================
   BOTONES RESULTADO
   ========================================================= */

/* RESULTADO · BOTONES */

.resultado-actions{
    flex-shrink:0;
    height:46px;
    padding-top:16px;

    display:flex;
    justify-content:center;
}

.botones-secundarios{
    display:flex;
    gap:16px;

    opacity:0.5;              /* 🔴 estado inicial */
    pointer-events:none;
}

.botones-secundarios.activo{
    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 */
}


/* =========================================================
   BOTÓN VOLVER
   ========================================================= */

.volver-categorias{
    display:inline-flex;
    align-items:center;
    align-self:flex-start;

    margin-bottom:10px;
    padding:4px 10px;

    background:#f1ede6;
    color:#2c3c3d;

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

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

    cursor:pointer;
    transition:all 0.15s ease;

    width:auto;
}

.volver-categorias:hover{
    background:#e8e2d8;
}

.volver-categorias::before{
    content:"←";
    margin-right:6px;
}


/* =========================================================
   LOADER
   ========================================================= */

.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); }
}


/* =========================================================
   TABS TOPBAR
   ========================================================= */

.tabs{
    display:flex;
    gap:18px;
}

.tabs a{
    text-decoration:none;
    color:#375e65;
    font-size:14px;
    font-family:"Inter", sans-serif;
    font-weight:500;
    padding:6px 12px;
    border-radius:6px;
    transition:all 0.15s ease;
}

.tabs a:hover{
    background:#f2efe9;
}

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



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

.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 */
.bloque-limite .btn-upgrade{
    width:220px;

    background:#c48a38;
    color:white;
    border:none;

    border-radius:6px;

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

    height:32px;
    padding:0 14px;

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

    margin:12px auto 0 auto;

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

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

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