/* Impresion del organigrama — la unica parte de rrhh-orgchart.css que NO puede
   acotarse a su componente, y conviene entender por que antes de "terminar la
   migracion" moviendola.

   La regla que hace el trabajo es:

       body.oc-printing * { visibility: hidden; }

   El sujeto es `*`: TODO el documento. Bajo CSS isolation el compilador le
   pondria el `b-{hash}` al sujeto, o sea `body.oc-printing *[b-hash]`, que solo
   alcanzaria a los elementos del propio OrgChart — justo los que hay que dejar
   visibles. La regla se convertiria en su contraria.

   Se queda global a proposito, con el bloque reducido a lo imprescindible. Es
   tambien la razon de la excepcion `body.oc-printing` declarada en
   tools/scripts/check-css-scope.ps1: la clase la pone el propio organigrama al
   imprimir, asi que fuera de ese momento no matchea nada.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Print: the SVG scales to the page, and the outline is what actually paginates a big chart ── */
@media print {
    /* visibility and not display: the chart container is nested deep inside the layout, and a display:none
       on any ancestor would take it down with everything else. */
    body.oc-printing * {
        visibility: hidden;
    }

    body.oc-printing .oc-print-target,
    body.oc-printing .oc-print-target * {
        visibility: visible;
    }

    body.oc-printing .oc-print-target {
        position: absolute;
        inset: 0 auto auto 0;
        width: 100%;
        max-height: none;
        overflow: visible;
        border: none;
        padding: 0;
    }

    .oc-print-target .oc-svg {
        width: 100%;
        height: auto;
        max-width: 100%;
    }

    .oc-print-target .oc-outline {
        position: static;
        width: auto;
        height: auto;
        margin: 16px 0 0 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }
}
