/*
 * Visor de fotos, videos y PDF, e insignia de "se puede tocar" en los elementos que abren algo.
 */

.abre-medio {
    position: relative;
    cursor: pointer;
    transition: transform .25s var(--curva), box-shadow .25s var(--curva), border-color .25s var(--curva);
}

.abre-medio:hover,
.abre-medio:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 26px 50px rgba(0, 0, 0, .28), 0 0 0 3px var(--lima);
    outline: none;
}

.insignia-medio {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 54px;
    min-width: 54px;
    padding: 0 14px;
    border-radius: 999px;
    font: 800 22px / 1 var(--fuente-titulo);
    color: #06284d;
    background: var(--lima);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    justify-content: center;
    animation: latir 2.4s ease-in-out infinite;
}

.abre-medio .insignia-medio .icono {
    font-size: 28px;
    color: #06284d;
    transform: none;
}

@keyframes latir {
    0%, 100% { box-shadow: 0 8px 20px rgba(0, 0, 0, .25), 0 0 0 0 rgba(175, 249, 73, .55); }
    50% { box-shadow: 0 8px 20px rgba(0, 0, 0, .25), 0 0 0 12px rgba(175, 249, 73, 0); }
}

/* ---------------------------------------------------------------- visor */

.visor {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visor[hidden] {
    display: none;
}

.visor__fondo {
    position: absolute;
    inset: 0;
    background: rgba(2, 10, 22, .9);
    backdrop-filter: blur(8px);
    animation: visor-fondo .3s ease both;
}

.visor__marco {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: min(92vw, 1500px);
    height: min(90vh, 900px);
    animation: visor-entrar .45s var(--resorte) both;
}

.visor__barra {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 0 12px;
    color: #e8eef6;
}

.visor__titulo {
    flex: 1;
    font: 800 22px / 1.2 var(--fuente-titulo);
}

.visor__contador {
    font: 600 16px / 1 var(--fuente-texto);
    color: rgba(255, 255, 255, .7);
    font-variant-numeric: tabular-nums;
}

.visor__boton,
.visor__flecha {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    font-size: 24px;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    cursor: pointer;
}

.visor__boton:hover,
.visor__flecha:hover {
    color: #06284d;
    background: var(--lima);
}

.visor__escena {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(0, 0, 0, .35);
}

.visor__escena img,
.visor__escena video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    animation: visor-foto .35s ease both;
}

.visor__escena iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.visor__flecha {
    position: absolute;
    top: 50%;
    display: none;
    transform: translateY(-50%);
}

.es-galeria .visor__flecha {
    display: inline-flex;
}

.visor__flecha--antes {
    left: -66px;
}

.visor__flecha--despues {
    right: -66px;
}

.visor__miniaturas {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding-top: 14px;
}

.visor__miniaturas:empty {
    display: none;
}

.visor__miniaturas button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 60px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 26px;
    color: #fff;
    background: rgba(255, 255, 255, .12) center / cover no-repeat;
    cursor: pointer;
    opacity: .65;
}

.visor__miniaturas button.es-actual {
    border-color: var(--lima);
    opacity: 1;
}

.visor__falta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px;
    color: #e8eef6;
    text-align: center;
    font: 500 18px / 1.4 var(--fuente-texto);
}

.visor__falta .icono {
    font-size: 64px;
    color: var(--lima);
}

.visor__falta strong {
    font: 800 26px / 1.2 var(--fuente-titulo);
}

.visor__falta code {
    padding: 6px 12px;
    border-radius: 8px;
    font: 600 16px / 1.4 var(--fuente-codigo);
    background: rgba(255, 255, 255, .1);
}

@keyframes visor-fondo {
    from { opacity: 0; }
}

@keyframes visor-entrar {
    from { opacity: 0; transform: scale(.92) translateY(20px); }
}

@keyframes visor-foto {
    from { opacity: 0; transform: scale(.97); }
}
