@charset "UTF-8";

/* =========================
   Gallery grid
========================= */

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 1.5rem 0;
}

.gallery-item {
    cursor: zoom-in;
    width: 200px;
    height: 125px;
    overflow: hidden;
    border: 1px solid #444;
    border-radius: 4px;
    background: #1a1a1a;
    position: relative;
}

.gallery-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-media {
    transform: scale(1.08);
}

.gallery-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    pointer-events: none;
}

.gallery-play span {
    font-size: 3.5rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* =========================
   Overlay
========================= */

.gallery-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(10px);
    z-index: 99999;
    animation: gallery-fadeIn 0.25s ease-out forwards;
}

/* Toolbar */

.gallery-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 20px;
    background-color: #00000047;
    z-index: 100;
}

.gallery-btn {
    color: white;
    padding: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.gallery-btn:hover {
    transform: scale(1.1);
    color: #ffcc00;
}

.gallery-btn span {
    font-size: 3rem !important;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8);
}

/* Navigation */

.gallery-nav {
    position: absolute;
    top: 80px;
    bottom: 0;
    width: 8%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 50;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}

.gallery-prev {
    left: 0;
}

.gallery-next {
    right: 0;
}

.gallery-nav span {
    font-size: 4rem;
    text-shadow: 0 0 15px black;
}

.gallery-prev span::before {
    content: "\276E";
}

.gallery-next span::before {
    content: "\276F";
}

/* Stage */

.gallery-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: zoom-out;
    pointer-events: none;
}

.gallery-image,
.gallery-video {
    pointer-events: auto;
    width: 96vw;
    height: 96vh;
    object-fit: contain;
}

.gallery-image {
    object-fit: contain;
    image-rendering: pixelated;
    user-select: none;
}

.gallery-video {
    width: 90vw;
    height: 96vh;
    /* height: calc(90vw * 9 / 16); */
    max-height: 85vh;
    max-width: 151vh;
    border: none;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

/* =========================
   Animations
========================= */

@keyframes gallery-fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes gallery-fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.gallery-overlay.is-closing {
    animation: gallery-fadeOut 0.2s ease-in forwards;
}

.gallery-media-enter {
    opacity: 0;
    transform: scale(0.98);
}

.gallery-media-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 180ms ease, transform 180ms ease;
}