/*
|--------------------------------------------------------------------------
| Photo Viewer
|--------------------------------------------------------------------------
*/

.pv-photo-viewer {
    position: fixed;

    inset: 0;

    z-index: 999999;

    display: none;
}

/*
|--------------------------------------------------------------------------
| Overlay
|--------------------------------------------------------------------------
*/

.pv-photo-viewer-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    background: rgba(0, 0, 0, 0.85);

    backdrop-filter: blur(6px);
}

/*
|--------------------------------------------------------------------------
| Container
|--------------------------------------------------------------------------
*/

.pv-photo-viewer-container {
    width: min(1020px, 88vw);

    height: min(800px, 88vh);

    display: flex;

    flex-direction: column;

    background: #111827;

    border-radius: 20px;

    overflow: hidden;

    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.45);
}

/*
|--------------------------------------------------------------------------
| Header
|--------------------------------------------------------------------------
*/

.pv-photo-viewer-header {
    height: 70px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 24px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/*
|--------------------------------------------------------------------------
| Counter
|--------------------------------------------------------------------------
*/

.pv-photo-viewer-counter {
    color: #fff;

    font-size: 15px;

    font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| Close
|--------------------------------------------------------------------------
*/

.pv-photo-viewer-close {
    width: 48px;

    height: 48px;

    border: none;

    outline: none;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.05);

    color: #fff;

    font-size: 22px;

    font-weight: 700;

    transition: all 0.22s ease;
}

.pv-photo-viewer-close:hover {
    background: rgba(139, 92, 246, 0.15);

    color: #ffffff;

    transform: rotate(90deg) scale(1.03);

    box-shadow: 0 0 12px rgba(139, 92, 246, 0.28);
}

.pv-photo-viewer-close:active {
    transform: scale(0.92) rotate(180deg);
}

/*
|--------------------------------------------------------------------------
| Body
|--------------------------------------------------------------------------
*/

.pv-photo-viewer-body {
    flex: 1;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 12px 12px;

    gap: 10px;

    min-height: 0;

    overflow: hidden;
}

/*
|--------------------------------------------------------------------------
| Navigation
|--------------------------------------------------------------------------
*/

.pv-photo-viewer-prev,
.pv-photo-viewer-next {
    width: 46px;

    height: 46px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: none;

    border-radius: 50%;

    cursor: pointer;

    background: rgba(255, 255, 255, 0.06);

    transition: all 0.22s ease;
}

.pv-photo-viewer-prev:hover,
.pv-photo-viewer-next:hover {
    background: rgba(139, 92, 246, 0.18);

    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

/*
|--------------------------------------------------------------------------
| Image
|--------------------------------------------------------------------------
*/

.pv-photo-viewer-image-wrapper {
    flex: 1;

    width: 100%;

    height: 100%;

    min-height: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    position: relative;

    user-select: none;
}

.pv-photo-viewer-image {
    display: block;

    max-width: 100%;

    max-height: 100%;

    object-fit: contain;

    user-select: none;

    -webkit-user-drag: none;

    will-change: transform;

    transition: none;
}

.pv-photo-viewer-image:active {
    cursor: grabbing;
}

/*
|--------------------------------------------------------------------------
| Footer
|--------------------------------------------------------------------------
*/

.pv-photo-viewer-footer {
    display: flex;

    justify-content: center;

    align-items: center;

    padding: 16px 22px;

    min-height: 120px;

    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/*
|--------------------------------------------------------------------------
| Thumbnails
|--------------------------------------------------------------------------
*/

.pv-photo-viewer-thumbnails {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 16px;

    width: 100%;

    overflow: visible;
}

/*
|--------------------------------------------------------------------------
| Thumbnail
|--------------------------------------------------------------------------
*/

.pv-photo-viewer-thumbnail {
    width: 88px;

    height: 88px;

    flex: 0 0 auto;

    border-radius: 12px;

    overflow: hidden;

    transition: all 0.2s ease;
}

.pv-photo-viewer-thumbnail img {
    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;
}

.pv-photo-viewer-thumbnail-active {
    transform: scale(1.08);

    border: 2px solid #8b5cf6;

    box-shadow:
        0 0 0 3px rgba(139, 92, 246, 0.2),
        0 10px 24px rgba(139, 92, 246, 0.28);
}

/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {
    .pv-photo-viewer-container {
        width: 100vw;

        height: 100vh;

        border-radius: 0;
    }

    .pv-photo-viewer-body {
        padding: 15px;
    }

    .pv-photo-viewer-footer {
        height: 90px;
    }

    .pv-photo-viewer-thumbnail {
        width: 60px;

        height: 60px;
    }
}

.pv-photo-viewer-thumbnail:hover {
    opacity: 1;

    transform: translateY(-3px);
}

/* ==========================================================
   Footer Tools
========================================================== */

.pv-photo-viewer-footer {
    display: flex;

    align-items: center;

    justify-content: space-between;
}

.pv-photo-viewer-tools {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-left: 20px;
}

.pv-tool {
    height: 34px;

    padding: 0 14px;

    border: none;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.06);

    color: #fff;

    cursor: pointer;

    font-size: 13px;

    font-weight: 600;

    transition: 0.25s;
}

.pv-tool:hover {
    background: #8b5cf6;

    transform: translateY(-2px);
}

/* ==========================================================
   SVG ICONS
========================================================== */

.pv-photo-viewer-close,
.pv-photo-viewer-prev,
.pv-photo-viewer-next {
    color: #d9dce8;
}

.pv-photo-viewer-close .pv-svg-icon {
    width: 22px;

    height: 22px;

    display: block;

    stroke: currentColor;

    transition: all 0.22s ease;
}

.pv-photo-viewer-prev .pv-svg-icon,
.pv-photo-viewer-next .pv-svg-icon {
    width: 30px;

    height: 30px;

    display: block;

    stroke: currentColor;

    transition: all 0.22s ease;
}

.pv-photo-viewer-close:hover,
.pv-photo-viewer-prev:hover,
.pv-photo-viewer-next:hover {
    color: #8b5cf6;
}

.pv-photo-viewer-close:hover .pv-svg-icon {
    transform: rotate(90deg) scale(1.08);
}

.pv-photo-viewer-prev:hover .pv-svg-icon,
.pv-photo-viewer-next:hover .pv-svg-icon {
    transform: scale(1.08);
}

.pv-svg-icon {
    width: 100%;

    height: 100%;

    stroke: currentColor;

    fill: none;

    transition: 0.22s ease;
}
