/* VS Clics Sociedades - mejoras UX del inventario */

/*
 * ESCRITORIO
 * El PHP global de VS convierte el nombre en .vsi-society-name-button.
 * Lo incluimos expresamente y usamos reglas de mayor prioridad para que el
 * efecto no quede anulado por el CSS global del sitio.
 */
@media (hover: hover) and (pointer: fine) and (min-width: 783px) {
    .vsi-view-profile,
    .vsi-table .vsi-society-name-button,
    .vsi-name-link[data-vsi-profile],
    .vsi-cell-name a[data-vsi-profile],
    [data-vsi-profile].vsi-name-text {
        display: inline-block !important;
        transform: translateY(0) scale(1) !important;
        transform-origin: center center !important;
        transition:
            transform 190ms cubic-bezier(.2,.8,.2,1),
            color 170ms ease,
            text-shadow 190ms ease,
            text-decoration-color 170ms ease !important;
        will-change: transform;
    }

    /* Ver ficha: aumento evidente, pero sin modificar el flujo de la tabla. */
    .vsi-view-profile:hover,
    .vsi-view-profile:focus-visible,
    .vsi-name-link[data-vsi-profile]:hover,
    .vsi-name-link[data-vsi-profile]:focus-visible,
    .vsi-cell-name a[data-vsi-profile]:hover,
    .vsi-cell-name a[data-vsi-profile]:focus-visible,
    [data-vsi-profile].vsi-name-text:hover,
    [data-vsi-profile].vsi-name-text:focus-visible {
        transform: translateY(-2px) scale(1.10) !important;
        text-decoration: underline !important;
        text-decoration-thickness: 2px !important;
        text-underline-offset: 4px !important;
        text-shadow: 0 5px 16px rgba(10,111,137,.20) !important;
    }

    /* Nombre creado por VS Core: mismo lenguaje visual que Ver ficha. */
    .vsi-table .vsi-society-name-button:hover,
    .vsi-table .vsi-society-name-button:focus-visible {
        transform: translateY(-2px) scale(1.10) !important;
        color: #0a6f89 !important;
        background: transparent !important;
        text-decoration: underline !important;
        text-decoration-thickness: 2px !important;
        text-underline-offset: 4px !important;
        text-shadow: 0 5px 16px rgba(10,111,137,.20) !important;
        box-shadow: none !important;
    }
}

/*
 * MÓVIL
 * La superficie útil de la tarjeta comunica que puede tocarse entera.
 * Los botones y enlaces conservan su comportamiento independiente.
 */
@media (max-width: 782px) {
    tr:has(.vsi-view-profile),
    tr:has(.vsi-society-name-button),
    tr:has(.vsi-name-link[data-vsi-profile]),
    tr:has(.vsi-cell-name a[data-vsi-profile]),
    tr:has([data-vsi-profile].vsi-name-text),
    .vsi-card:has([data-vsi-profile]),
    .vsi-item:has([data-vsi-profile]),
    .vsi-company-card:has([data-vsi-profile]),
    .vsi-sociedad-card:has([data-vsi-profile]),
    .vsi-row:has([data-vsi-profile]) {
        cursor: pointer;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vsi-view-profile,
    .vsi-table .vsi-society-name-button,
    .vsi-name-link[data-vsi-profile],
    .vsi-cell-name a[data-vsi-profile],
    [data-vsi-profile].vsi-name-text {
        transition: none !important;
        transform: none !important;
    }
}
