/**
 * Estilos para la galería colaborativa de eventos
 * Diseño moderno, responsivo y accesible
 */

.event-gallery-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Estados de la galería */
.gallery-state-info {
    text-align: center;
    padding: 2rem;
}

.gallery-state-info.inactive {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border-radius: 12px;
}

.gallery-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.gallery-icon.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    animation: pulse 2s infinite;
}

.gallery-icon.public {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
    color: white;
}

.gallery-icon.closed {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.gallery-state-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.gallery-state-info p {
    margin: 0 0 1rem 0;
    opacity: 0.9;
}

.event-timing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Contenedor activo */
.gallery-active-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.gallery-info h3 {
    margin: 0 0 0.25rem 0;
    color: #212529;
    font-size: 1.25rem;
}

.gallery-info p {
    margin: 0 0 0.5rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.photo-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.photo-counter .count {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.photo-counter .label {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Interfaz de subida */
.upload-interface {
    padding: 1.5rem;
}

.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f8f9fa;
}

.upload-zone:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.upload-zone.drag-over {
    border-color: #28a745;
    background: #d4edda;
    transform: scale(1.02);
}

.upload-content i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.upload-content h4 {
    margin: 0 0 0.5rem 0;
    color: #212529;
}

.upload-content p {
    margin: 0 0 1rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.btn-upload {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Formulario de subida */
.upload-form {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
}

.photo-preview {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.photo-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.btn-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #212529;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.upload-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #5a6268;
}

.btn-submit {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Barra de progreso */
.upload-progress {
    margin-top: 1rem;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff 0%, #28a745 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Límite alcanzado */
.upload-limit-reached {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
    border-radius: 12px;
}

.limit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-limit-reached h4 {
    margin: 0 0 0.5rem 0;
}

.upload-limit-reached p {
    margin: 0;
    opacity: 0.9;
}

/* Vista previa de fotos del usuario */
.gallery-preview {
    padding: 1.5rem;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}

.gallery-preview h4 {
    margin: 0 0 1rem 0;
    color: #212529;
}

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

.user-photo-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

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

.photo-info {
    padding: 0.75rem;
}

.photo-info h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #212529;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.photo-status.aprobada {
    color: #28a745;
}

.photo-status.pendiente {
    color: #ffc107;
}

.photo-status.rechazada {
    color: #dc3545;
}

.no-photos {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
}

/* Autenticación requerida */
.gallery-auth-required {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
    color: white;
    border-radius: 12px;
}

.auth-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.gallery-auth-required h3 {
    margin: 0 0 0.5rem 0;
}

.gallery-auth-required p {
    margin: 0 0 1.5rem 0;
    opacity: 0.9;
}

.btn-login {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.btn-login:hover {
    background: white;
    color: #6f42c1;
}

/* Estados públicos y cerrados */
.gallery-public-container,
.gallery-closed-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.gallery-link {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

.btn-gallery {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-gallery:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
    text-decoration: none;
    color: white;
}

/* Notificaciones */
.gallery-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

.gallery-notification.success {
    border-left: 4px solid #28a745;
}

.gallery-notification.success i {
    color: #28a745;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .event-gallery-container {
        margin: 1rem 0;
        padding: 1rem;
    }

    .gallery-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .upload-zone {
        padding: 1.5rem 1rem;
    }

    .upload-content i {
        font-size: 2rem;
    }

    .upload-actions {
        flex-direction: column;
    }

    .user-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .gallery-notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .photo-counter {
        flex-direction: column;
        gap: 0.25rem;
    }

    .upload-content h4 {
        font-size: 1.1rem;
    }

    .upload-content p {
        font-size: 0.8rem;
    }
}
