/* GALLERY MODAL STYLES - Optimized for large image display */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

/* Gallery-specific modal - industry standard sizing */
.modal-content.modal-gallery {
    background: #1a1a1a;
    padding: 0;
    border-radius: 8px;
    /* Fixed width - industry standard for image galleries */
    width: 1000px;
    max-width: 85vw;
    max-height: 85vh;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Gallery Image - Optimized for 1000px modal */
.gallery-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    min-height: 400px;
    object-fit: cover;
    display: block;
    background: #000;
}

/* Caption Area */
.gallery-caption {
    width: 100%;
    background: #1a1a1a;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-top: 1px solid #333;
}

.model-name {
    color: #c7d4e3;
    font-size: 16px;
    font-weight: 500;
}

.model-link {
    color: #6bc4ff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    white-space: nowrap;
}

.model-link:hover {
    color: #8dd4ff;
    text-decoration: underline;
}

/* Checkbox */
.modal-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #999;
    cursor: pointer;
    user-select: none;
    padding: 15px 30px;
    background: #1a1a1a;
}

.modal-checkbox input {
    cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: scale(0.95);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-content.modal-gallery {
        width: 95vw;
        max-width: 95vw;
        max-height: 90vh;
    }
    
    .gallery-image {
        max-height: 400px;
        min-height: 250px;
    }
    
    .gallery-caption {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px 20px;
    }
    
    .modal-checkbox {
        padding: 12px 20px;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .modal-content.modal-gallery {
        width: 90vw;
        max-width: 800px;
    }
    
    .gallery-image {
        max-height: 500px;
    }
}