/**
 * Fullscreen Image Modal Styles
 * Lightweight fullscreen image viewer styles
 */

/* Fullscreen Modal Overlay */
.fullscreen-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

/* Modal Content Container */
.fullscreen-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Fullscreen Image */
.fullscreen-image {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease-in-out;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.fullscreen-image:hover {
    transform: scale(1.02);
}

/* Image Caption */
.fullscreen-caption {
    color: white;
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
    max-width: 80%;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* Close Button */
.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.2s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.fullscreen-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Navigation Buttons */
.fullscreen-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    box-sizing: border-box;
    pointer-events: none;
}

.fullscreen-prev,
.fullscreen-next {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-prev:hover,
.fullscreen-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.fullscreen-prev:disabled,
.fullscreen-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .fullscreen-modal-content {
        padding: 10px;
    }
    
    .fullscreen-image {
        max-width: 95%;
        max-height: 70%;
    }
    
    .fullscreen-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .fullscreen-nav {
        padding: 0 15px;
    }
    
    .fullscreen-prev,
    .fullscreen-next {
        width: 50px;
        height: 50px;
        font-size: 20px;
        padding: 10px 15px;
    }
    
    .fullscreen-caption {
        font-size: 14px;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .fullscreen-image {
        max-width: 98%;
        max-height: 60%;
    }
    
    .fullscreen-close {
        top: 5px;
        right: 10px;
        font-size: 25px;
        width: 35px;
        height: 35px;
    }
    
    .fullscreen-prev,
    .fullscreen-next {
        width: 45px;
        height: 45px;
        font-size: 18px;
        padding: 8px 12px;
    }
}

/* Loading State */
.fullscreen-image[src=""] {
    display: none;
}

/* Ensure proper z-index stacking */
.fullscreen-modal * {
    box-sizing: border-box;
}

/* Accessibility improvements */
.fullscreen-close:focus,
.fullscreen-prev:focus,
.fullscreen-next:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .fullscreen-modal {
        background-color: rgba(0, 0, 0, 0.95);
    }
    
    .fullscreen-close,
    .fullscreen-prev,
    .fullscreen-next {
        background-color: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}
