/**
 * Rating System - Image Viewer Styles
 * Full-screen image viewer & modal detail
 */

/* ===== Image Viewer Full Screen ===== */
.image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 99999 !important;
    display: none;
}

.image-viewer-modal.active {
    display: block;
}

.image-viewer-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(255,255,255,0.95), transparent);
}

.image-viewer-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.image-viewer-close:hover {
    background: #e0e0e0;
}

.image-viewer-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.image-viewer-body {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px;
    overflow: hidden;
}

#imageViewerImg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    transition: opacity 0.15s ease;
}

.image-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-viewer-nav:hover {
    background: #e0e0e0;
}

.image-viewer-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.image-viewer-prev {
    left: 20px;
}

.image-viewer-next {
    right: 20px;
}

.image-viewer-footer {
    flex-shrink: 0;
    max-height: 40vh;
    overflow-y: auto;
    padding: 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.image-viewer-review-info {
    color: #333;
}

.viewer-stars {
    display: flex;
    gap: 2px;
}

.viewer-stars i {
    color: #ffc107;
    font-size: 14px;
}

#viewerUserName {
    color: #333 !important;
    font-weight: 600;
}

#viewerDate {
    color: #666 !important;
    font-size: 13px;
}

#viewerDescription {
    color: #555 !important;
    line-height: 1.6;
}

#viewerCounter {
    color: #666 !important;
    font-size: 13px;
}

#viewerAvatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

/* ===== Review Detail Modal ===== */
#reviewDetailModal .t-frame {
    position: relative;
    width: 460px;
    height: 320px;
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: 1;
}

#reviewDetailModal #modalMainImage {
    max-width: 92%;
    max-height: 92%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

#reviewDetailModal .nav-circle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: rgba(0,0,0,.06);
    border: 1px solid #e5e7eb;
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    z-index: 2;
    cursor: pointer;
    transition: all 0.2s;
}

#reviewDetailModal .nav-circle:hover {
    background: rgba(0,0,0,.1);
}

#reviewDetailModal .nav-circle.disabled {
    opacity: 0.4;
    pointer-events: none;
}

#reviewDetailModal .nav-circle.left {
    left: 0;
    transform: translate(-50%, -50%);
}

#reviewDetailModal .nav-circle.right {
    right: 0;
    transform: translate(50%, -50%);
}

#reviewDetailModal .nav-circle i {
    font-size: 18px;
}

#reviewDetailModal .modal-dialog {
    max-width: 980px;
}

#reviewDetailModal .modal-body {
    padding: 20px 24px;
}

/* ===== Mobile Responsive for Viewer ===== */
@media (max-width: 767px) {
    .image-viewer-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .image-viewer-prev {
        left: 12px;
    }

    .image-viewer-next {
        right: 12px;
    }

    .image-viewer-body {
        padding: 60px 10px 10px;
    }

    .image-viewer-footer {
        max-height: 50vh;
        padding: 12px;
    }

    .image-viewer-review-info {
        font-size: 14px;
    }

    #viewerAvatar {
        width: 36px !important;
        height: 36px !important;
    }

    /* Review Detail Modal */
    #reviewDetailModal .t-frame {
        width: 100%;
        height: 320px;
        border-radius: 12px;
    }

    #reviewDetailModal .nav-circle {
        width: 48px;
        height: 48px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    #reviewDetailModal .nav-circle i {
        font-size: 18px;
    }

    #reviewDetailModal .modal-body {
        padding: 20px 16px;
    }

    #reviewDetailModal .modal-dialog {
        margin: 12px;
    }
}

@media (max-width: 576px) {
    #reviewDetailModal .t-frame {
        height: 280px;
        border-radius: 10px;
    }

    #reviewDetailModal .nav-circle {
        width: 44px;
        height: 44px;
    }

    #reviewDetailModal .nav-circle i {
        font-size: 16px;
    }
}

