﻿/* =========================================================
   INTERIORS360
   PORTFOLIO IMAGE VIEWER
   ========================================================= */


/* =========================================================
   MAIN VIEWER
   ========================================================= */

.portfolio-viewer {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}


    .portfolio-viewer.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }


/* =========================================================
   BACKDROP
   ========================================================= */

.portfolio-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(75, 75, 75, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}


/* =========================================================
   DIALOG
   ========================================================= */

.portfolio-viewer-dialog {
    position: relative;
    z-index: 2;
    width: min(1150px, 94vw);
    max-height: 94vh;
    padding: 30px 75px 22px;
    background: #eeeeee;
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: scale(0.96);
    transition: transform 0.3s ease;
}


.portfolio-viewer.is-open
.portfolio-viewer-dialog {
    transform: scale(1);
}


/* =========================================================
   IMAGE AREA
   ========================================================= */

.portfolio-viewer-image-area {
    width: 100%;
    height: 76vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    /*background: #e2e2e2;*/
}


    .portfolio-viewer-image-area img {
        display: block;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        user-select: none;
        -webkit-user-drag: none;
    }


/* =========================================================
   CLOSE
   ========================================================= */

.portfolio-viewer-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 5;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #555555;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}


    .portfolio-viewer-close:hover {
        background: #a85a6a;
        color: #ffffff;
        transform: rotate(90deg);
    }


/* =========================================================
   PREVIOUS / NEXT
   ========================================================= */

.portfolio-viewer-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #555555;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 7px 22px rgba(0, 0, 0, 0.14);
    transform: translateY(-50%);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}


.portfolio-viewer-arrow--previous {
    left: 12px;
}


.portfolio-viewer-arrow--next {
    right: 12px;
}


.portfolio-viewer-arrow:hover {
    background: #a85a6a;
    color: #ffffff;
}


.portfolio-viewer-arrow--previous:hover {
    transform: translate(-3px, -50%);
}


.portfolio-viewer-arrow--next:hover {
    transform: translate(3px, -50%);
}


/* =========================================================
   INFORMATION
   ========================================================= */

.portfolio-viewer-info {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
}


    .portfolio-viewer-info h3 {
        margin: 0;
        color: #333333;
        font-size: 18px;
        font-weight: 600;
        letter-spacing: 0.3px;
        text-align: center;
    }


.portfolio-viewer-counter {
    color: #777777;
    font-size: 14px;
}


/* =========================================================
   PLAY / PAUSE
   ========================================================= */

.portfolio-viewer-controls {
    margin: 13px;
    display: flex;
    justify-content: center;
}


.portfolio-viewer-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 15px;
    border: 1px solid #d3d3d3;
    border-radius: 30px;
    background: #ffffff;
    color: #555555;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}


    .portfolio-viewer-play:hover {
        background: #a85a6a;
        border-color: #a85a6a;
        color: #ffffff;
    }


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .portfolio-viewer {
        padding: 10px;
    }


    .portfolio-viewer-dialog {
        width: 97vw;
        max-height: 95vh;
        padding: 48px 16px 18px;
        border-radius: 14px;
    }


    .portfolio-viewer-image-area {
        height: 75vh;
        border-radius: 8px;
    }


    .portfolio-viewer-close {
        top: 9px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 25px;
    }


    .portfolio-viewer-arrow {
        width: 42px;
        height: 42px;
        font-size: 31px;
    }


    .portfolio-viewer-arrow--previous {
        left: 6px;
    }


    .portfolio-viewer-arrow--next {
        right: 6px;
    }


    .portfolio-viewer-info {
        margin-top: 10px;
        gap: 8px;
        flex-wrap: wrap;
    }


        .portfolio-viewer-info h3 {
            font-size: 16px;
        }


    .portfolio-viewer-counter {
        font-size: 13px;
    }
}

/* =========================================================
   SLIDESHOW PROGRESS BAR
   ========================================================= */

.portfolio-viewer-progress {
    position: absolute;
    top: 12px;
    left: 75px;
    right: 75px;
    height: 3px;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.65);
    z-index: 6;
}


.portfolio-viewer-progress-bar {
    width: 0%;
    height: 100%;
    background: #a85a6a;
    border-radius: inherit;
    transform-origin: left center;
}

@media (max-width: 768px) {

    .portfolio-viewer-progress {
        top: 10px;
        left: 16px;
        right: 16px;
        height: 3px;
    }
}
