/* =========================================================
   DOC MODAL – CSS AISLADO (NO TOCA NADA MÁS)
   ========================================================= */

/* Modal base */
#docModal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: none; /* oculto por defecto */
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* Modal activo */
#docModal.doc-modal--active {
    display: flex;
}

/* Overlay */
#docModal .doc-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    backdrop-filter: blur(4px);
}

/* Caja */
#docModal .doc-modal__box {
    position: relative;
    z-index: 1;
    width: min(92vw, 1100px);
    max-height: 92vh;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .6);

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

/* Imagen */
#docModal .doc-modal__img {
    max-width: 100%;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Botón cerrar */
#docModal .doc-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    border: 0;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .95);
    color: #111;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .3);
}

/* Error */
#docModal .doc-modal__error {
    display: none;
    color: #fff;
    padding: 24px;
    text-align: center;
    font-size: 14px;
}

#docModal .doc-modal__error.is-visible {
    display: block;
}

/* Accesibilidad */
#docModal .sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
