/* Modal de Galería Colaborativa */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gallery-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.gallery-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gallery-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.gallery-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 18px;
    transition: background 0.2s;
}

.gallery-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.gallery-modal-body {
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    padding: 0;
}

/* Sección de subida */
.gallery-modal-upload-section {
    padding: 28px;
}

.upload-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.upload-limit-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.photos-count {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.photos-limit {
    font-size: 18px;
    color: #6c757d;
}

.photos-text {
    color: #495057;
    margin-left: 8px;
}

.event-status .status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-activa {
    background: #d4edda;
    color: #155724;
}

.status-publica {
    background: #d1ecf1;
    color: #0c5460;
}

/* Área de subida */
.upload-area {
    margin-bottom: 32px;
}

.upload-dropzone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 16px;
    display: block;
}

.upload-dropzone h3 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.upload-dropzone p {
    margin: 0 0 20px 0;
    color: #6c757d;
    font-size: 14px;
}

.btn-upload-select {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-upload-select:hover {
    transform: translateY(-2px);
}

/* Límite alcanzado */
.upload-limit-reached {
    text-align: center;
    padding: 40px 20px;
    background: #fff3cd;
    border-radius: 12px;
    border: 1px solid #ffeaa7;
    margin-bottom: 32px;
}

.upload-limit-reached i {
    font-size: 48px;
    color: #856404;
    margin-bottom: 16px;
    display: block;
}

.upload-limit-reached h3 {
    color: #856404;
    margin: 0 0 8px 0;
    font-size: 18px;
}

.upload-limit-reached p {
    color: #856404;
    margin: 0;
    opacity: 0.8;
}

/* Sección de fotos del usuario */
.user-photos-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
}

.user-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.user-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.user-photo-item:hover {
    transform: translateY(-2px);
}

.user-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.8));
    display: flex;
    align-items: flex-end;
    padding: 12px;
}

.photo-status {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.photo-status.approved {
    background: #d4edda;
    color: #155724;
}

.photo-status.pending {
    background: #fff3cd;
    color: #856404;
}

.photo-status.rejected {
    background: #f8d7da;
    color: #721c24;
}

/* Sin fotos */
.no-photos-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-photos-message i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.5;
}

/* Mensajes de estado */
.gallery-state-message {
    text-align: center;
    padding: 60px 40px;
}

.gallery-state-message i {
    font-size: 64px;
    color: #6c757d;
    margin-bottom: 24px;
    display: block;
}

.gallery-state-message h3 {
    color: #495057;
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 600;
}

.gallery-state-message p {
    color: #6c757d;
    margin: 0 0 8px 0;
    font-size: 16px;
    line-height: 1.5;
}

.event-timing {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #495057;
    font-weight: 500;
}

/* Mensaje de autenticación */
.auth-required-message {
    text-align: center;
    padding: 60px 40px;
}

.auth-required-message i {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 24px;
    display: block;
}

.auth-required-message h3 {
    color: #495057;
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 600;
}

.auth-required-message p {
    color: #6c757d;
    margin: 0 0 24px 0;
    font-size: 16px;
}

.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-modal {
        padding: 10px;
    }
    
    .gallery-modal-content {
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .gallery-modal-header {
        padding: 20px;
    }
    
    .gallery-modal-upload-section {
        padding: 20px;
    }
    
    .upload-status-bar {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .user-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .gallery-state-message,
    .auth-required-message {
        padding: 40px 20px;
    }
    
    .gallery-state-message i,
    .auth-required-message i {
        font-size: 48px;
    }
    
    .gallery-state-message h3,
    .auth-required-message h3 {
        font-size: 20px;
    }
}
