/* Gallery Popup Modal Styles - Google Photos Style */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #202124;
    z-index: 10000;
    overflow: hidden;
}

.gallery-modal.active {
    display: flex;
    flex-direction: column;
}

/* Header */
.gallery-modal-header {
    background: #202124;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #3c4043;
    flex-shrink: 0;
}

.gallery-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-modal-title h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #e8eaed;
    margin: 0;
}

.gallery-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 26px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Main Content Area */
.gallery-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Left Sidebar - Thumbnails */
.gallery-sidebar {
    width: 320px;
    background: #202124;
    border-right: 1px solid #3c4043;
    overflow-y: auto;
    flex-shrink: 0;
}

.gallery-sidebar::-webkit-scrollbar {
    width: 8px;
}

.gallery-sidebar::-webkit-scrollbar-track {
    background: #202124;
}

.gallery-sidebar::-webkit-scrollbar-thumb {
    background: #5f6368;
    border-radius: 4px;
}

.gallery-sidebar::-webkit-scrollbar-thumb:hover {
    background: #80868b;
}

.gallery-thumbnail {
    position: relative;
    cursor: pointer;
    margin: 8px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 3px solid transparent;
}

.gallery-thumbnail:hover {
    transform: scale(1.02);
}

.gallery-thumbnail.active {
    border-color: #8ab4f8;
}

.gallery-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* Right Side - Main Viewer */
.gallery-viewer {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000;
    overflow: hidden;
}

.gallery-viewer-image {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 4px;
}

/* Navigation Arrows */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(32, 33, 36, 0.8);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    color: #e8eaed;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.gallery-nav-btn:hover {
    background: rgba(60, 64, 67, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav-prev {
    left: 20px;
}

.gallery-nav-next {
    right: 20px;
}

/* Image Info Overlay */
.gallery-image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 40px 30px 20px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-viewer:hover .gallery-image-info {
    opacity: 1;
}

.gallery-image-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    font-family: 'Outfit', sans-serif;
}

.gallery-image-info p {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

/* Close button on viewer */
.gallery-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(32, 33, 36, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #e8eaed;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.gallery-viewer-close:hover {
    background: rgba(60, 64, 67, 0.9);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-sidebar {
        width: 250px;
    }

    .gallery-thumbnail img {
        height: 140px;
    }
}

@media (max-width: 768px) {
    .gallery-modal-body {
        flex-direction: column;
    }

    .gallery-sidebar {
        width: 100%;
        height: 120px;
        border-right: none;
        border-bottom: 1px solid #3c4043;
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .gallery-thumbnail {
        flex-shrink: 0;
        width: 100px;
        margin: 8px 4px;
    }

    .gallery-thumbnail img {
        height: 100px;
        width: 100px;
    }

    .gallery-viewer-image {
        max-width: 100%;
        max-height: 100%;
    }

    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .gallery-nav-prev {
        left: 10px;
    }

    .gallery-nav-next {
        right: 10px;
    }

    .gallery-modal-title h2 {
        font-size: 16px;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-viewer-image {
    animation: fadeIn 0.3s ease;
}