/* =Estilos para el visor de imágenes= */

.viewer {
    background: rgba(31, 31, 30, 0.97);
}

.viewer li {
    background: none;
    padding: 0;
}

.viewer li>div {
    left: 1.25em; /* Usando em */
    top: 1.25em; /* Usando em */
    bottom: 1.25em; /* Usando em */
    right: 1.25em; /* Usando em */
}

.viewer li.loading>div {
    background: url(../images/loading.gif) center center no-repeat;
}

.multiplebgs .viewer li.loading>div {
    background: url(../images/loading.gif) center center no-repeat, url(../images/loading_frame.png) center center no-repeat;
}

.viewer li.loading.previous,
.viewer li.loading.next {
    background: 0;
}

.viewer img {
    box-shadow: 0 0 0.31em 0 rgba(0, 0, 0, 0.5); /* Usando em */
}

.viewer .close {
    position: absolute; /* Añadido para posicionar el botón */
    top: 1.87em; /* Usando em */
    right: 1.25em; /* Usando em */
    font-weight: 500;
    opacity: 0.8; /* Opacidad inicial */
    transition: opacity 0.2s ease-in-out;
    color: #fff;
    font-size: 2em; /* Usando em */
    line-height: 0;
    text-align: center;
    z-index: 3;
    border: none; /* Eliminar borde predeterminado del botón */
    background: none; /* Eliminar fondo predeterminado del botón */
    cursor: pointer; /* Cambiar el cursor al pasar por encima */
}

.viewer .close:hover {
    opacity: 1; /* Opacidad completa al pasar el ratón */
}

.viewer .caption {
    visibility: hidden;
    opacity: 0;
    color: #cfcfcf;
    font-size: 1.12em; /* Usando em */
    line-height: 3.12em; /* Usando em */
    transition: opacity 1.5s ease-in-out;
}

.viewer .current .caption {
    opacity: 1;
    visibility: visible;
}

/* Accesibilidad */
.viewer .close {
    aria-label: "Cerrar visor"; /* Etiqueta aria para accesibilidad */
}