﻿
/* ============================================================
   MMWebADMSol
   AJUSTES VISUALES - PANTALLAS DE ENLACE

   Fecha: 22-10-2026

   1. Alinear Desde, Hasta e ID horizontalmente.
   2. Destacar RUT en detalle.
   3. Quitar divisiones internas del resumen.

   No modifica las funcionalidades.
   ============================================================ */


/* ============================================================
   1. SOLICITUDES DE ENLACE
   BARRA DE FILTROS EN UNA SOLA FILA
   ============================================================ */

html body .enlace-page
.enlace-shell .enlace-controls {
    position: relative !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    height: 100px !important;
    min-height: 100px !important;
    flex: 0 0 100px !important;
    padding: 12px 22px !important;
    gap: 14px !important;
    box-sizing: border-box !important;
    background: #f3f6fb !important;
}


/* ============================================================
   BOTÓN ACTUALIZAR
   MANTENER A LA IZQUIERDA
   ============================================================ */

html body .enlace-page
.enlace-controls .enlace-refresh {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    flex: 0 0 54px !important;
    width: 54px !important;
    height: 54px !important;
    margin: 0 !important;
    align-self: center !important;
}


/* ============================================================
   GRUPO DE FECHAS
   DESDE Y HASTA LADO A LADO
   ============================================================ */

html body .enlace-page
.enlace-controls .enlace-dates {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: auto !important;
    min-width: 0 !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}


    /* Cada conjunto: Etiqueta + Fecha */

    html body .enlace-page
    .enlace-controls
    .enlace-dates .enlace-date-row {
        display: grid !important;
        grid-template-columns: 50px clamp(138px, 9.5vw, 195px) !important;
        align-items: center !important;
        width: auto !important;
        min-width: 0 !important;
        height: 42px !important;
        gap: 8px !important;
        margin: 0 !important;
        padding: 0 !important;
    }


/* Etiquetas */

html body .enlace-page
.enlace-controls .enlace-date-row label {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #344054 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}


/* Campos de fecha */

html body .enlace-page
.enlace-controls .enlace-date-row input {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    border: 1px solid #c5d2e8 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: #344054 !important;
    font-size: 13px !important;
}


/* ============================================================
   CAMPO ID
   POSICIONAR DESPUÉS DE HASTA
   ============================================================ */

html body .enlace-page
.enlace-controls .enlace-id-search {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    display: flex !important;
    align-items: center !important;
    flex: 1 1 265px !important;
    width: auto !important;
    min-width: 185px !important;
    height: 42px !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}


    /* Input de búsqueda */

    html body .enlace-page
    .enlace-controls
    .enlace-id-search .enlace-id-input {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-width: 95px !important;
        max-width: 270px !important;
        height: 40px !important;
        margin: 0 !important;
        border: 1px solid #c5d2e8 !important;
        border-radius: 12px !important;
        background: #ffffff !important;
        color: #344054 !important;
        box-sizing: border-box !important;
    }


    /* Checkbox ID Caso */

    html body .enlace-page
    .enlace-controls
    .enlace-id-search .enlace-checkbox {
        display: flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        gap: 8px !important;
        height: 40px !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }


/* ============================================================
   SELECTOR DE ESTADOS
   CONSERVAR A LA DERECHA
   ============================================================ */

html body .enlace-page
.enlace-controls .enlace-state-area {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    margin: 0 0 0 auto !important;
    gap: 12px !important;
    height: 42px !important;
}


    /* Mantener tamaño y bordes modernos */

    html body .enlace-page
    .enlace-controls
    .enlace-state-area .enlace-state-wrapper {
        width: clamp(190px, 14vw, 260px) !important;
        height: 40px !important;
        flex: 0 0 auto !important;
        border: 1px solid #c5d2e8 !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        background: #ffffff !important;
    }


    /* Botón limpiar */

    html body .enlace-page
    .enlace-controls
    .enlace-state-area .enlace-clear {
        position: relative !important;
        flex: 0 0 42px !important;
        width: 42px !important;
        height: 42px !important;
        margin: 0 !important;
    }


/* ============================================================
   2. DETALLE DE ENLACE
   RUT EN NEGRITA
   ============================================================ */

html body .detail-page
.case-summary .requester-rut {
    font-weight: 800 !important;
    color: #101653 !important;
    font-size: 14px !important;
}


/* ============================================================
   3. DETALLE DE ENLACE
   QUITAR LÍNEAS INTERNAS
   ============================================================ */

/* Conservar el contenedor exterior */

html body .detail-page
.case-summary {
    border: 1px solid #d9e2f0 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    background: #ffffff !important;
}


    /* Quitar bordes del encabezado */

    html body .detail-page
    .case-summary .summary-header {
        border: none !important;
        box-shadow: none !important;
    }

        html body .detail-page
        .case-summary .summary-header > div {
            border: none !important;
            box-shadow: none !important;
        }


    /* Quitar bordes de la fila de información */

    html body .detail-page
    .case-summary .summary-row {
        border: none !important;
        box-shadow: none !important;
    }

    html body .detail-page
    .case-summary .summary-cell {
        border: none !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        border-bottom: none !important;
        box-shadow: none !important;
    }


        /* Quitar borde de la primera columna */

        html body .detail-page
        .case-summary .summary-cell:first-child {
            border: none !important;
        }


    /* Quitar línea debajo del RUT */

    html body .detail-page
    .case-summary .requester-rut {
        border: none !important;
        border-bottom: none !important;
        box-shadow: none !important;
    }


    /* Datos del solicitante sin separadores */

    html body .detail-page
    .case-summary .requester-data {
        border: none !important;
        box-shadow: none !important;
    }


/* ============================================================
   4. RESPONSIVE
   EVITAR DESBORDES EN PANTALLAS PEQUEÑAS
   ============================================================ */

@media (max-width: 1100px) {

    html body .enlace-page
    .enlace-shell .enlace-controls {
        flex-wrap: wrap !important;
        height: auto !important;
        min-height: 145px !important;
        flex: 0 0 auto !important;
        justify-content: flex-start !important;
        row-gap: 12px !important;
    }

    html body .enlace-page
    .enlace-controls .enlace-id-search {
        flex: 1 1 250px !important;
    }

    html body .enlace-page
    .enlace-controls .enlace-state-area {
        margin-left: 0 !important;
    }
}


/* Pantallas de celular */

@media (max-width: 700px) {

    html body .enlace-page
    .enlace-shell .enlace-controls {
        align-items: stretch !important;
        padding: 12px !important;
        gap: 12px !important;
    }

    html body .enlace-page
    .enlace-controls .enlace-dates {
        flex-wrap: wrap !important;
        width: 100% !important;
    }

    html body .enlace-page
    .enlace-controls .enlace-date-row {
        width: 100% !important;
        grid-template-columns: 50px minmax(0, 1fr) !important;
    }

    html body .enlace-page
    .enlace-controls .enlace-id-search {
        width: 100% !important;
        flex: 1 1 100% !important;
    }

    html body .enlace-page
    .enlace-controls .enlace-state-area {
        width: 100% !important;
        justify-content: space-between !important;
    }

        html body .enlace-page
        .enlace-controls
        .enlace-state-area .enlace-state-wrapper {
            flex: 1 1 auto !important;
            width: auto !important;
            min-width: 0 !important;
        }
}

/* ============================================================
   MMWebADMSol
   CORRECCIÓN DE ESPACIADO EN GALERÍA DE IMÁGENES
   DETALLE DE ENLACE
   ============================================================ */

html body .detail-page .images-body {
    /* Adaptar la altura de cada fila a sus imágenes */
    grid-auto-rows: max-content !important;
    /* Separación vertical entre filas */
    row-gap: 16px !important;
    /* Mantener separación horizontal */
    column-gap: 12px !important;
    /* Mantener las imágenes arriba */
    align-content: start !important;
}


    /* Mantener las tarjetas dentro de sus filas */

    html body .detail-page
    .images-body .case-file-card {
        align-self: start !important;
        margin-bottom: 0 !important;
    }

/* ============================================================
   MMWebADMSol
   CORRECCIÓN FECHA TOPE DEPARTAMENTO
   DETALLE DE ENLACE
   ============================================================ */

/* Igualar columnas de fechas con Estado y Trámite */

@media (min-width: 901px) {

    html body .detail-page .form-date-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 55px !important;
        column-gap: 18px !important;
        align-items: start !important;
    }
}

/* Alinear los dos campos correctamente */

html body .detail-page
.form-date-row > .field-group {
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

    /* Mostrar las etiquetas completas */

    html body .detail-page
    .form-date-row > .field-group > label {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 10px 0 !important;
        padding: 0 !important;
        color: #101653 !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        text-align: left !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        transform: none !important;
    }

    /* Alinear inputs con sus etiquetas */

    html body .detail-page
    .form-date-row > .field-group > input {
        display: block !important;
        position: static !important;
        width: min(250px, 100%) !important;
        height: 41px !important;
        margin: 0 !important;
        padding: 0 12px !important;
        box-sizing: border-box !important;
        border: 1px solid #d9e2f0 !important;
        border-radius: 11px !important;
        background: #ffffff !important;
        color: #334155 !important;
        transform: none !important;
    }

/* Adaptación a pantallas pequeñas */

@media (max-width: 700px) {

    html body .detail-page .form-date-row {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 18px !important;
    }
}
