/* Modal overlay */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

/* Modal content */
.image-modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    z-index: 10000;
}

.image-modal-image {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border-radius: 4px;
}

/* Navigation buttons */
.image-modal-prev,
.image-modal-next,
.image-modal-close {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.image-modal-prev:hover,
.image-modal-next:hover,
.image-modal-close:hover {
    background: #fff;
}

.image-modal-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.image-modal-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.image-modal-close {
    top: 1rem;
    right: 1rem;
    font-size: 2.5rem;
    line-height: 1;
    padding: 0.25rem 0.75rem;
}

/* Metadata panel */
.image-modal-meta {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    max-height: 30vh;
    overflow-y: auto;
}

.image-modal-counter {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.exif-list {
    margin: 0;
}

.exif-list dd {
    margin: 0.25rem 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .image-modal-prev,
    .image-modal-next {
        font-size: 1.5rem;
        padding: 0.25rem 0.5rem;
    }

    .image-modal-close {
        font-size: 2rem;
    }

    .image-modal-meta {
        font-size: 0.8rem;
        max-height: 20vh;
    }
}
