/*
 * Ajustes globales del CMS. Van fuera de main.min.css para no depender de
 * recompilar el SCSS.
 */

/*
 * Campos de solo lectura (tipo STATIC, ej. tab General de las vistas):
 * etiqueta arriba y valor abajo, como siempre, pero como lista con separadores.
 */
fieldset.fieldset-static {
    padding: 10px 0;
    margin: 0;
    border-bottom: 1px solid #eef0f3;
}
fieldset.fieldset-static:first-child {
    padding-top: 0;
}
fieldset.fieldset-static:last-child {
    border-bottom: 0;
}
fieldset.fieldset-static > .form-group {
    margin-bottom: 0;
}
fieldset.fieldset-static .control-label {
    margin-bottom: 2px !important;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
}
fieldset.fieldset-static .form-control-static {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    overflow-wrap: anywhere;
}
/* Valor vacio ("Empty") */
fieldset.fieldset-static p.font-italic.text-secondary {
    margin: 0;
    font-size: 13px;
    color: #9aa1ac !important;
}

/*
 * Tabla de los listados: list.twig le pone .table-responsive al <table>, que lo
 * deja en display:block y las columnas solo ocupan el ancho de su contenido.
 * Se vuelve a display:table al 100% y el scroll horizontal pasa al contenedor.
 * Solo desde 992px: por debajo el tema muestra cada fila como tarjeta.
 */
@media (min-width: 992px) {
    .table-responsive-custom {
        overflow-x: auto;
    }
    .table-responsive-custom > table.table-responsive {
        display: table;
        width: 100%;
        overflow: visible;
    }
    /*
     * Menu de acciones (⋮): cerrado solo tiene opacity:0, asi que seguia ocupando
     * lugar y, con el overflow del contenedor, el de la ultima fila generaba scroll
     * vertical. Cerrado no se renderiza; en las ultimas filas abre hacia arriba para
     * que no lo recorte el borde inferior.
     */
    .table-responsive-custom .tooltip-edit:not(.active) {
        display: none;
    }
    .table-responsive-custom tbody tr:nth-last-child(-n+2):not(:first-child) .tooltip-edit {
        top: auto;
        bottom: 100%;
        margin-top: 0;
        margin-bottom: 15px;
    }
    .table-responsive-custom tbody tr:nth-last-child(-n+2):not(:first-child) .tooltip-edit:before,
    .table-responsive-custom tbody tr:nth-last-child(-n+2):not(:first-child) .tooltip-edit:after {
        bottom: auto;
        top: 100%;
        margin-bottom: 0;
        margin-top: -1px;
        border-bottom-color: transparent;
    }
    .table-responsive-custom tbody tr:nth-last-child(-n+2):not(:first-child) .tooltip-edit:before {
        border-top-color: #DDD;
    }
    .table-responsive-custom tbody tr:nth-last-child(-n+2):not(:first-child) .tooltip-edit:after {
        border-top-color: #FFF;
    }
}
